CVE-2021-21248
JSON

9.6critical

Post-Auth Arbitrary Code execution via Groovy script injection

Severity
9.6critical CVSS:3.1 by GitHub_M
Exploit likelihood
1.47% (higher than 74% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M

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

Product or packageVersionsReported by
theonedev onedev< 4.0.3CVE List
onedev_project onedevbefore 4.0.3NVD

All scores

GitHub_M9.6critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N
NVD8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD6.5medium CVSS:2.0AV:N/AC:L/Au:S/C:P/I:P/A:P

Classification

What each source says

CVE List

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.

NVD (es)

OneDev es una plataforma devops todo en uno.&#xa0;En OneDev versiones anteriores a 4.0.3. Se presenta una vulnerabilidad crítica que involucra los parámetros del endpoint de compilación.&#xa0;InputSpec es usada para definir parámetros de una especificación de compilación.&#xa0;Lo hace al usar clases Groovy generadas dinámicamente.&#xa0;Un usuario capaz de controlar los parámetros de trabajo puede ejecutar código arbitrario en el servidor de OneDev inyectando código Groovy arbitrario.&#xa0;El resultado final es la inyección de un constructor estático que ejecutará código arbitrario.&#xa0;Para obtener un ejemplo completo, consulte la GHSA referenciada.&#xa0;Este problema fue abordado en la versión 4.0.3 al escapar de caracteres especiales tal y como la cita de la entrada del usuario

References

Sources

SourceRecordLicence
CVE ListCVE-2021-21248 changed 2024-08-03CVE Terms of Use
NVDCVE-2021-21248 changed 2026-06-17Public domain