CVE-2022-39205 Access Control Bypass in Onedev
Unauthenticated attackers can bypass access controls to execute arbitrary code on Onedev instances lacking proper reverse proxy configuration.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2022-39205?
CVE-2022-39205 is a critical authentication bypass vulnerability in theonedev onedev, published on 13 Sep 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
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.
Weakness: CWE-287
Which versions are affected by CVE-2022-39205?
It affects 1 product.
Products include Onedev Project Onedev.
How do I fix CVE-2022-39205?
No fix has been published for CVE-2022-39205 yet. Limit exposure of the affected software until one is available.
Upgrade, and rotate credentials and sessions that may have been exposed. More about Authentication bypass.
Is CVE-2022-39205 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-39205 exists.
Other vulnerabilities in theonedev onedev
Sources
Also known as GHSA-4f9h-h82c-4xm2.