Security advisory
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2021-21248
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 12:42 UTC · Revision 1
Source evidence
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.
osv:CVE-2021-21248
Complete source record
{
"id": "d6b27c1c518f9fff7fe200d8058c11c5faff26ff2b394769ebd4acbd967f5696",
"url": "https://osv.dev/vulnerability/CVE-2021-21248",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2021-21248",
"summary": "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.",
"evidence": "osv:CVE-2021-21248",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2021-21248",
"aliases": [
"CVE-2021-21248",
"GHSA-gwp4-5498-hv5f"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/theonedev/onedev",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "4bd71941974a1b077e955616d7ba3da6fd21670c"
},
{
"fixed": "39d95ab8122c5d9ed18e69dc024870cae08d2d60"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:onedev_project:onedev:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "4.0.3"
}
],
"source": "CPE_RANGE"
},
{
"range": [
{
"fixed": "39d95ab8122c5d9ed18e69dc024870cae08d2d60"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"versions": [
"v4.0.0",
"v3.2.4",
"v3.2.3",
"v3.2.2",
"v3.2.1",
"v3.2.0",
"v3.1.2",
"v3.1.1",
"v3.1.0",
"v3.0.10",
"v3.0.9",
"v3.0.8",
"v3.0.7",
"v3.0.6",
"v3.0.5",
"v3.0.4",
"2.0.5",
"2.0.4",
"2.0.0",
"2.0-beta-build120",
"2.0-beta-build119"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-21248.json",
"vanir_signatures": [
{
"id": "CVE-2021-21248-0aa897d3",
"digest": {
"threshold": 0.9,
"line_hashes": [
"328517268871830018930557871912003146622",
"20910458844816322456253282477776400339",
"96439450927759822255062807841622656105",
"13792724726599233070052788992702438481"
]
},
"source": "https://github.com/theonedev/onedev/commit/39d95ab8122c5d9ed18e69dc024870cae08d2d60",
"target": {
"file": "server-core/src/main/java/io/onedev/server/model/support/inputspec/InputSpec.java"
},
"deprecated": false,
"signature_type": "Line",
"signature_version": "v1"
},
{
"id": "CVE-2021-21248-0e5cc867",
"digest": {
"length": 538,
"function_hash": "70220704029479522527471992683922055107"
},
"source": "https://github.com/theonedev/onedev/commit/39d95ab8122c5d9ed18e69dc024870cae08d2d60",
"target": {
"file": "server-core/src/main/java/io/onedev/server/model/support/inputspec/textinput/TextInput.java",
"function": "getPropertyDef"
},
"deprecated": false,
"signature_type": "Function",
"signature_version": "v1"
},
{
"id": "CVE-2021-21248-3293c5b8",
"digest": {
"threshold": 0.9,
"line_hashes": [
"111338269377089353463508498149491676445",
"139430799199400221570926262484523590448",
"175587402203147316825303261968781122054",
"325175320828442439627117363541638942758",
"877509100382475066525309626866558274",
"126400034584215042413127943485952889680",
"208728838931797298297312743535911880123"
]
},
"source": "https://github.com/theonedev/onedev/commit/39d95ab8122c5d9ed18e69dc024870cae08d2d60",
"target": {
"file": "server-core/src/main/java/io/onedev/server/model/support/inputspec/textinput/TextInput.java"
},
"deprecated": false,
"signature_type": "Line",
"signature_version": "v1"
}
],
"vanir_signatures_modified": "2026-10-20T14:14:52Z"
}
}
],
"modified": "2026-10-20T14:14:52.715115224Z",
"provider": "osv",
"references": [
"https://github.com/theonedev/onedev/security/advisories/GHSA-gwp4-5498-hv5f",
"https://github.com/theonedev/onedev/commit/39d95ab8122c5d9ed18e69dc024870cae08d2d60"
],
"provider_metadata": {}
},
"related_cves": [
{
"value": "CVE-2021-21248",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 388763,
"published_at": "2021-01-15T21:15:13.663+00:00"
}