SecurityContext

CVE-2021-21242: OneDev - Remote Code Execution

  • Cve: CVE-2021-21242
  • Name: OneDev - Remote Code Execution
  • Description: OneDev is an all-in-one devops platform. In OneDev before version 4.0.3, there is a critical vulnerability which can lead to pre-auth remote code execution. AttachmentUploadServlet deserializes untrusted data from the `Attachment-Support` header. This Servlet does not enforce any authentication or authorization checks. This issue may lead to pre-auth remote code execution. This issue was fixed in 4.0.3 by removing AttachmentUploadServlet and not using deserialization
  • Impact: Attackers can execute arbitrary code remotely without authentication, leading to full system compromise.
  • Remediation: Update to version 4.0.3 or later, where the issue has been fixed by removing AttachmentUploadServlet and not using deserialization.
  • Vulnerability type: insecure_deserialization
  • Vulnerability impact: remote_code_execution
  • Requirement type: none
  • Labels source: projectdiscovery
  • Severity: critical
  • Cvss score: 9.8
  • Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Epss score: 0.74191
  • Epss percentile: 0.99491
  • Assignee: [email protected]
  • Published at: 2021-01-15T21:15:13Z
  • Age in days: 2139
  • Modified at: 2026-06-17T03:35:06Z
  • Patch available: yes
  • References total: 2
  • Products total: 1
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2021-21242
  • Nvd status: modified
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
  • Not known: requirements, hackerone

Cwe

IdName
CWE-74Improper Neutralization of Special Elements in Output Used by a Downstream Component
CWE-502Deserialization of Untrusted Data

References

UrlSourceTags
https://github.com/theonedev/onedev/commit/f864053176c08f59ef2d97fea192ceca46a4d9benvdPatch, Third Party Advisory
https://github.com/theonedev/onedev/security/advisories/GHSA-5q3q-f373-2jv8nvdThird Party Advisory

Products

ProductAffectedPlatform boundSourcesUrl
onedev_project:onedev< 4.0.3nonvd/v1/products/onedev_project/onedev

Projects

RepositoryLink kindsIndexedUrl
theonedev/onedevcommit, fix, security_advisoryyes/v1/repositories/theonedev/onedev

Index

  • Checked, none or zero: repositories, repositories high signal, packages

Exploitation

  • Remote: yes
  • Exposed hosts: 7
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, authentication required
  • Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports