CVE-2021-21249

Post-Auth Unsafe Yaml deserialization

HIGH
8.8
CVSS Score
Published: January 15, 2021 at 08:10 PM UTC
Updated: June 17, 2026 at 03:35 AM UTC
2 products affected across 2 vendorsOnedevProject Onedev

Using onedev by theonedev?

Get instant alerts when new vulnerabilities affect onedev - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH8.8
Exploit prediction
EPSS 3%

Description

OneDev is an all-in-one devops platform. In OneDev before version 4.0.3, there is an issue involving YAML parsing which can lead to post-auth remote code execution. In order to parse and process YAML files, OneDev uses SnakeYaml which by default (when not using `SafeConstructor`) allows the instantiation of arbitrary classes. We can leverage that to run arbitrary code by instantiating classes such as `javax.script.ScriptEngineManager` and using `URLClassLoader` to load the script engine provider, resulting in the instantiation of a user controlled class. For a full example refer to the referenced GHSA. This issue was addressed in 4.0.3 by only allowing certain known classes to be deserialized

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 4.0.3
Affected range stops below 4.0.3, so it looks safe — our inference, not a vendor statement
v < 4.0.3
Affected range stops below 4.0.3, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

CVSS

Attack Vector
NETWORK
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-74CWE-502

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card