CVE-2022-39205
Access Control Bypass in Onedev
Severity Score
Exploit Likelihood
Affected Versions
Public Exploits
1Exploited in Wild
-Decision
Descriptions
Onedev is an open source, self-hosted Git Server with CI/CD and Kanban. In versions of Onedev prior to 7.3.0 unauthenticated users can take over a OneDev instance if there is no properly configured reverse proxy. The /git-prereceive-callback endpoint is used by the pre-receive git hook on the server to check for branch protections during a push event. It is only intended to be accessed from localhost, but the check relies on the X-Forwarded-For header. Invoking this endpoint leads to the execution of one of various git commands. The environment variables of this command execution can be controlled via query parameters. This allows attackers to write to arbitrary files, which can in turn lead to the execution of arbitrary code. Such an attack would be very hard to detect, which increases the potential impact even more. Users are advised to upgrade. There are no known workarounds for this issue.
Onedev es un servidor Git de código abierto, auto-alojado con CI/CD y Kanban. En versiones de Onedev anteriores a 7.3.0, los usuarios no autenticados pueden tomar el control de una instancia de OneDev si no se presenta un proxy inverso configurado apropiadamente. El endpoint /git-prereceive-callback es usado por el hook git pre-receive en el servidor para comprobar las protecciones de las ramas durante un evento push. Sólo puede accederse a él desde localhost, pero la comprobación es basada en la cabecera X-Forwarded-For. La invocación de este endpoint conlleva a una ejecución de uno de varios comandos de git. Las variables de entorno de la ejecución de este comando pueden ser controladas por medio de parámetros de consulta. Esto permite a atacantes escribir en archivos arbitrarios, lo que a su vez puede conllevar a una ejecución de código arbitrario. Un ataque de este tipo sería muy difícil de detectar, lo que aumenta aún más el impacto potencial. Es recomendado a usuarios actualizar. No se presentan mitigaciones conocidas para este problema
CVSS Scores
SSVC
- Decision:-
Timeline
- 2022-09-02 CVE Reserved
- 2022-09-13 CVE Published
- 2024-06-17 EPSS Updated
- 2024-08-03 CVE Updated
- 2024-08-03 First Exploit
- ---------- Exploited in Wild
- ---------- KEV Due Date
CWE
- CWE-287: Improper Authentication
CAPEC
References (4)
URL | Tag | Source |
---|---|---|
https://github.com/theonedev/onedev/releases/tag/v7.3.0 | Release Notes | |
https://github.com/theonedev/onedev/security/advisories/GHSA-4f9h-h82c-4xm2 | Third Party Advisory |
URL | Date | SRC |
---|---|---|
https://blog.sonarsource.com/onedev-remote-code-execution | 2024-08-03 |
URL | Date | SRC |
---|---|---|
https://github.com/theonedev/onedev/commit/f1e97688e4e19d6de1dfa1d00e04655209d39f8e | 2022-10-01 |
URL | Date | SRC |
---|
Affected Vendors, Products, and Versions
Vendor | Product | Version | Other | Status | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Vendor | Product | Version | Other | Status | <-- --> | Vendor | Product | Version | Other | Status |
Onedev Project Search vendor "Onedev Project" | Onedev Search vendor "Onedev Project" for product "Onedev" | < 7.3.0 Search vendor "Onedev Project" for product "Onedev" and version " < 7.3.0" | - |
Affected
|