// For flags

CVE-2022-39205

Access Control Bypass in Onedev

Severity Score

9.8
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

1
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
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

*Credits: N/A
CVSS Scores
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
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
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