CVE-2021-21248CWE-74

Post-Auth Arbitrary Code execution via Groovy script injection

Critical · published January 15, 2021

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

🔥 A crafty input could let a user run any code they desire on your OneDev server! Think of it like a chef who can secretly decide the ingredients of a dish without the restaurant owner knowing — they could turn a simple meal into a culinary catastrophe! An attacker could inject malicious Groovy code into the build parameters, effectively hijacking the server and executing arbitrary commands. This means they could access sensitive data, manipulate existing builds, or even bring the entire service to its knees. It's absolutely devastating!

Put simply

Think of it like a chef who can secretly decide the ingredients of a dish without the restaurant owner knowing — they could turn a simple meal into a culinary catastrophe! This vulnerability allows users controlling job parameters to run arbitrary Groovy code on the OneDev server by injecting code via build endpoint parameters. The flaw stems from the lack of proper escaping of input, which enables code execution through a static constructor.

What to do

An attacker could inject malicious Groovy code into the build parameters, effectively hijacking the server and executing arbitrary commands. This means they could access sensitive data, manipulate existing builds, or even bring the entire service to its knees. It's absolutely devastating! Upgrade to OneDev version 4.0.3 or later immediately to patch this vulnerability. Additionally, ensure user input is properly validated and special characters are escaped to prevent similar exploits in the future. Don't wait, secure your server now! You've got this! Follow these steps and you'll have your OneDev environment secured in no time. 🛡️

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.01469 · 73.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 Arbitrary Code execution via Groovy script injection
    cvelistv5