onedev: Improper Authentication
CVE-2022-39205 is a critical-severity improper authentication vulnerability in onedev from Theonedev, with a CVSS 3.1 base score of 9.8 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. Affected onedev versions: < 7.3.0. The record does not name a fixed version, so check the vendor advisory. There is no confirmed exploitation so far. EPSS estimates a 2.46% chance of exploitation within 30 days, higher than 85% of scored CVEs.
Critical severity: a successful attack would have severe impact.
What to do
- Check which version of onedev you run against the affected versions below, and install the vendor's latest release.
- Read the advisory on github.com for workarounds and exact fixed builds.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
Affected products and versions
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 9.0 | Critical | CNA (github.com) |
| CVSS 3.1 | 9.8 | Critical | NVD |
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.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Improper Authentication
When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.
How developers prevent this class of flaw
- Use an authentication framework or library such as the OWASP ESAPI Authentication feature.
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: poc, automatable: no, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Advisories
- github.com/theonedev/onedev/security/advisories/GHSA-4f9h-h82c-4xm2Third Party Advisory
Patches and release notes
- github.com/theonedev/onedev/commit/f1e97688e4e19d6de1dfa1d00e04655209d39f8eThird Party Advisory
- github.com/theonedev/onedev/releases/tag/v7.3.0Release Notes, Third Party Advisory
Technical write-ups (may include proof of concept)
- blog.sonarsource.com/onedev-remote-code-execution/Exploit, Third Party Advisory
Other vulnerabilities in onedev
- 8.3 High severity
- 7.1 High severity
- 7.5 High severity
- 8.8 High severity
- 7.5 High severity
- 9.9 Critical severity
Recent Improper Authentication vulnerabilities
- 8.8 High severity
- 7.5 High severity
- 8.8 High severity
- 7.1 High severity
- 7.5 High severity
- 9.8 Critical severity
Spotted an error? Tell us.