CVE-2021-21248

Post-Auth Arbitrary Code execution via Groovy script injection

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 1%

Description

OneDev is an all-in-one devops platform. In OneDev before version 4.0.3, there is a critical vulnerability involving the build endpoint parameters. InputSpec is used to define parameters of a Build spec. It does so by using dynamically generated Groovy classes. A user able to control job parameters can run arbitrary code on OneDev's server by injecting arbitrary Groovy code. The ultimate result is in the injection of a static constructor that will run arbitrary code. For a full example refer to the referenced GHSA. This issue was addressed in 4.0.3 by escaping special characters such as quote from user input.

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-94

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