OnedevApplication · Onedev Project

CVE-2021-21247

HIGH · 8.8 CVSS v3.1 Published 2021-01-15
Fix available
A fix is available. Upgrade to 4.0.3 or later.
See remediation →
94/100
Remediation priority · Urgent
Remotely reachable Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
OneDev is an all-in-one devops platform. In OneDev before version 4.0.3, the application's BasePage registers an AJAX event listener (`AbstractPostAjaxBehavior`) in all pages other than the login page. This listener decodes and deserializes the `data` query parameter. We can access this listener by submitting a POST request to any page. This issue may lead to `post-auth RCE` This endpoint is subject to authentication and, therefore, requires a valid user to carry on the attack. This issue was addressed in 4.0.3 by encrypting serialization payload with secrets only known to server.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

OneDev's BasePage registers an AJAX event listener that deserializes the 'data' query parameter without validation. This post-authentication deserialization flaw allows authenticated users to achieve RCE. Version 4.0.3 fixed this by encrypting serialization payloads with server-side secrets.

MitigationUpgrade OneDev to version 4.0.3 or later, which implements encrypted serialization payloads to prevent unsafe deserialization attacks.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
OnedevApplication
Affected:< 4.0.3

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Identify OneDev installation and locate version
    Check for OneDev by reviewing running Java processes, docker containers, or installation directories. Common paths: /opt/onedev, /home/onedev, or check systemd services. OneDev typically runs as a Java application. Check for a VERSION file in the installation directory or look for version info in the About page if you have web access.
    Affected if OneDev version is found to be below 4.0.3
  2. Confirm OneDev is running and accessible
    Verify the OneDev web interface is reachable by accessing the application's URL over HTTP/HTTPS. Check if the login page responds. OneDev commonly runs on port 6611 or 8080 by default.
    Affected if OneDev is accessible and responding without requiring authentication initially
  3. Verify the BasePage AJAX endpoint is reachable
    Attempt to access the AJAX endpoint that handles the 'data' query parameter. In OneDev, this is typically exposed through the BasePage class. The endpoint pattern is usually under /~ajax or similar paths. Use a tool like curl to make a request: curl -I 'http://TARGET/~ajax?data=test'
    Affected if The AJAX endpoint responds (even with an error) indicating the vulnerable endpoint exists and is accessible
  4. Check if deserialization without encryption is possible
    Examine if the 'data' parameter can be processed without encryption. In unpatched versions below 4.0.3, the data parameter accepts raw serialized Java objects. If you have valid credentials, attempt to send a serialized payload in the 'data' parameter. Without credentials, verify that the endpoint accepts unauthenticated requests and processes the parameter.
    Affected if The AJAX endpoint accepts and attempts to deserialize the 'data' parameter without requiring encrypted/validated input, and the OneDev version is below 4.0.3
  5. Review server logs for deserialization activity
    Examine OneDev server logs (typically in the logs/ directory under the OneDev installation) for entries containing 'deserializ' or 'ClassNotFoundException' related to the data parameter. These may indicate exploitation attempts or successful deserialization.
    Affected if Logs show deserialization attempts on the 'data' parameter and version is below 4.0.3

A user is affected if their OneDev installation is accessible and the installed version is below 4.0.3, since the BasePage AJAX endpoint deserializes the 'data' query parameter without validation in unpatched versions.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

From vendor data
Upgrade available Upgrade to 4.0.3 or later
Fixed in 4.0.3
Interim mitigation

Upgrade OneDev to version 4.0.3 or later, which implements encrypted serialization payloads to prevent unsafe deserialization attacks.

Fix this in Onedev Scoped from the published advisory
  • Consultation2.0 h
  • Implementation4.0 h
  • Testing3.0 h
  • Review / QA1.0 h
10.0 hours of engineering $1,750
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $2,800.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2021-21247 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2021-21247 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data