CVE-2021-21249CWE-74

Post-Auth Unsafe Yaml deserialization

Critical · published January 15, 2021

CVSS v3.1
9.6
EPSS
3%
Percentile
87.5
In the wild
Unconfirmed
What it is

🔥 A sneaky YAML parsing flaw in OneDev could let attackers execute arbitrary code after logging in! Think of it like a restaurant kitchen where the chef can whip up any dish without checking the recipe book. If the chef can add any ingredient, they might just create something hazardous instead of the intended meal! This vulnerability is absolutely devastating. After logging in, an attacker could run any code they want on the server, which could lead to data breaches, total system compromise, or worse! The potential fallout is serious, putting sensitive data and system integrity at real risk.

Put simply

Think of it like a restaurant kitchen where the chef can whip up any dish without checking the recipe book. If the chef can add any ingredient, they might just create something hazardous instead of the intended meal! The issue stems from OneDev's use of SnakeYaml for YAML parsing, which, without the `SafeConstructor`, allows arbitrary class instantiation. This means that by manipulating YAML files, an attacker can leverage classes like `ScriptEngineManager` to execute malicious scripts.

What to do

This vulnerability is absolutely devastating. After logging in, an attacker could run any code they want on the server, which could lead to data breaches, total system compromise, or worse! The potential fallout is serious, putting sensitive data and system integrity at real risk. Upgrade OneDev to version 4.0.3 or later immediately to mitigate this vulnerability. Additionally, ensure that YAML parsing is configured to use `SafeConstructor` to restrict class instantiation. Regular audits can help catch similar vulnerabilities before they become critical. You've got this! Follow these steps to secure your system and keep those attackers at bay! 🛡️

The record
Technical detail
CVSS v3.1
9.6 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N
CVSS v4.0
Not supplied
EPSS
0.03059 · 87.5th percentile
Weakness
CWE-74 · Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
Published
2021-01-15T20:10Z
EPSS history
Timeline
  • 15 JAN 20:10Z
    Post-Auth Unsafe Yaml deserialization
    cvelistv5