CVE-2023-24828
📋 TL;DR
CVE-2023-24828 is a cryptographic weakness in OneDev's access token and password reset key generation algorithm that allows normal users to predict or brute-force administrative credentials. This affects all OneDev instances running versions before 7.9.12, particularly those with self-registration enabled where attackers could create accounts to exploit the vulnerability.
💻 Affected Systems
- OneDev
📦 What is this software?
Onedev by Onedev Project
⚠️ Risk & Real-World Impact
Worst Case
Complete system compromise where any user (or anyone who can register) gains administrator privileges, leading to full control over the Git server, CI/CD pipelines, and sensitive source code.
Likely Case
Privilege escalation where authenticated users gain administrative access to manipulate repositories, pipelines, and user accounts.
If Mitigated
Limited impact if strict access controls, network segmentation, and monitoring are in place to detect unusual privilege escalation attempts.
🎯 Exploit Status
Exploitation requires user access but uses predictable cryptographic generation that can be brute-forced or analyzed.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 7.9.12
Vendor Advisory: https://github.com/theonedev/onedev/security/advisories/GHSA-jf5c-9r77-3j5j
Restart Required: Yes
Instructions:
1. Backup your OneDev instance. 2. Download version 7.9.12 or later from the official repository. 3. Stop the OneDev service. 4. Replace with patched version. 5. Restart the service.
🧯 If You Can't Patch
- Disable self-registration to reduce attack surface.
- Implement network segmentation to isolate OneDev from critical systems.
🔍 How to Verify
Check if Vulnerable:
Check OneDev version via web interface or configuration files; versions below 7.9.12 are vulnerable.
Check Version:
Check the OneDev web interface admin panel or review server logs for version information.
Verify Fix Applied:
Confirm version is 7.9.12 or higher and test that access tokens/reset keys appear cryptographically random.
📡 Detection & Monitoring
Log Indicators:
- Unusual privilege escalation events
- Multiple failed then successful admin login attempts from non-admin users
- Unexpected user account creation followed by admin access
Network Indicators:
- Unusual API calls to administrative endpoints from non-admin accounts
SIEM Query:
source="onedev" AND (event="privilege_escalation" OR user_role_change="admin")
🔗 References
- https://github.com/theonedev/onedev/commit/d67dd9686897fe5e4ab881d749464aa7c06a68e5
- https://github.com/theonedev/onedev/security/advisories/GHSA-jf5c-9r77-3j5j
- https://github.com/theonedev/onedev/commit/d67dd9686897fe5e4ab881d749464aa7c06a68e5
- https://github.com/theonedev/onedev/security/advisories/GHSA-jf5c-9r77-3j5j