Security advisory
OneDev is an all-in-one devops platform. In OneDev before version 4.0.3, the REST UserResource endpoint performs a security check to make sure that only administrators can list user details. However for the `/users/{id}` endpoint there are no security checks enforced so it is possible to retrieve arbitrary user details including their Access Tokens! These access tokens can be used to access the API or clone code in the build spec via the HTTP(S) protocol. It has permissions to all projects accessible by the user account. This issue may lead to `Sensitive data leak` and leak the Access Token which can be used to impersonate the administrator or any other users. This issue was addressed in 4.0.3 by removing user info from restful api.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2021-21246
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 12:45 UTC · Revision 1
Source evidence
OneDev is an all-in-one devops platform. In OneDev before version 4.0.3, the REST UserResource endpoint performs a security check to make sure that only administrators can list user details. However for the `/users/{id}` endpoint there are no security checks enforced so it is possible to retrieve arbitrary user details including their Access Tokens! These access tokens can be used to access the API or clone code in the build spec via the HTTP(S) protocol. It has permissions to all projects accessible by the user account. This issue may lead to `Sensitive data leak` and leak the Access Token which can be used to impersonate the administrator or any other users. This issue was addressed in 4.0.3 by removing user info from restful api.
osv:CVE-2021-21246
Complete source record
{
"id": "fdd76a70f17a2bf314e69b7da172384888d91e42ffc545388b673774c1834a18",
"url": "https://osv.dev/vulnerability/CVE-2021-21246",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2021-21246",
"summary": "OneDev is an all-in-one devops platform. In OneDev before version 4.0.3, the REST UserResource endpoint performs a security check to make sure that only administrators can list user details. However for the `/users/{id}` endpoint there are no security checks enforced so it is possible to retrieve arbitrary user details including their Access Tokens! These access tokens can be used to access the API or clone code in the build spec via the HTTP(S) protocol. It has permissions to all projects accessible by the user account. This issue may lead to `Sensitive data leak` and leak the Access Token which can be used to impersonate the administrator or any other users. This issue was addressed in 4.0.3 by removing user info from restful api.",
"evidence": "osv:CVE-2021-21246",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2021-21246",
"aliases": [
"CVE-2021-21246",
"GHSA-66v7-gg85-f4gx"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/theonedev/onedev",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "4bd71941974a1b077e955616d7ba3da6fd21670c"
},
{
"fixed": "a4491e5f79dc6cc96eac20972eedc8905ddf6089"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:onedev_project:onedev:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "4.0.3"
}
],
"source": "CPE_RANGE"
},
{
"range": [
{
"fixed": "a4491e5f79dc6cc96eac20972eedc8905ddf6089"
}
],
"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-21246.json",
"vanir_signatures": [
{
"id": "CVE-2021-21246-0126a93a",
"digest": {
"threshold": 0.9,
"line_hashes": [
"265544679088450976286567343753454539291",
"290291128718986517225183632453197422572",
"191343462365318500861413632541656666250",
"65642472135235774316033645779951589153",
"192801028566669596034599601012246172332",
"334451459612836562264488727384129848431",
"33644770542989013531153095179265407599"
]
},
"source": "https://github.com/theonedev/onedev/commit/a4491e5f79dc6cc96eac20972eedc8905ddf6089",
"target": {
"file": "server-core/src/main/java/io/onedev/server/model/User.java"
},
"deprecated": false,
"signature_type": "Line",
"signature_version": "v1"
},
{
"id": "CVE-2021-21246-09dd634c",
"digest": {
"length": 804,
"function_hash": "102236486167081441081923426723460098514"
},
"source": "https://github.com/theonedev/onedev/commit/a4491e5f79dc6cc96eac20972eedc8905ddf6089",
"target": {
"file": "server-core/src/main/java/io/onedev/server/rest/UserResource.java",
"function": "query"
},
"deprecated": false,
"signature_type": "Function",
"signature_version": "v1"
},
{
"id": "CVE-2021-21246-31c2c3b7",
"digest": {
"length": 51,
"function_hash": "216190859915552726671707505792069809036"
},
"source": "https://github.com/theonedev/onedev/commit/a4491e5f79dc6cc96eac20972eedc8905ddf6089",
"target": {
"file": "server-core/src/main/java/io/onedev/server/rest/UserResource.java",
"function": "UserResource"
},
"deprecated": false,
"signature_type": "Function",
"signature_version": "v1"
},
{
"id": "CVE-2021-21246-cee7c626",
"digest": {
"length": 101,
"function_hash": "234303566095282213905866039376581638683"
},
"source": "https://github.com/theonedev/onedev/commit/a4491e5f79dc6cc96eac20972eedc8905ddf6089",
"target": {
"file": "server-core/src/main/java/io/onedev/server/rest/UserResource.java",
"function": "get"
},
"deprecated": false,
"signature_type": "Function",
"signature_version": "v1"
},
{
"id": "CVE-2021-21246-ffcbc285",
"digest": {
"threshold": 0.9,
"line_hashes": [
"55146524478353154066841747809100313173",
"155208409083310459480981793457883901102",
"278519360112228739235102531745545587871",
"274258486337604552185670105730970684947",
"106327609276262899415947427411210555981",
"192541950210730456313424102919147232751",
"204089564985430163303471056046516780439",
"228673730479687737783960298369983228453",
"180449660640984208278513257429089903554",
"134346453225581351310577602998016498487",
"327386516391715596367271046411329732100",
"43435856727006756816844103759907683243",
"178889882143651559018639943669192487753",
"268968735866465728334714303219982760853",
"303874570530459429097988838520216583111",
"242236035987290582089962119509394986033",
"204254968957529369810988331487232666190",
"295606925745351293329385047383366006526",
"11048659588341102160837105081396441906",
"32688165701935559663969762180189837148",
"72576538276543563626790374472926591039",
"255561979344784400964196612662774962706",
"169881825817079464743297918587780400064",
"39700052195291360257059320381457368593",
"311402923682015650020478399081866988671",
"80031077493852222354727901975969715279",
"200601558936590737435902122883668691236",
"113330397376943522212619039862933435884",
"154582123195001248027070293997501309456",
"69671775748735976723686710211266635873",
"166217862080434189505880058641863289211",
"7173152915424900494578259031684870365",
"7489823968587621138948881941459291129",
"76541733080349851183270209233787767786",
"98195179315918634741241967891665045740",
"311796894317976669067646815877006274319",
"35832316088218800982052063511742207045",
"58964626822997831372612897494039765148",
"113974112720153485881820245285516070456",
"15189306556519813649388612541328839837",
"327755572841288961797741801805908848221",
"121522519219285242980909255673643417602",
"120941739499961091468702969531912108029",
"165421825322481705551660759523439890602",
"79615413114707248694126485567051274148",
"177551014182755003791178275496592490803",
"108715339359248647928177325327385909746",
"234175376242180835092604630501571893644",
"301743669300053555951522635280788989502",
"291234571005053838753440061994015662410",
"263730657217083408461018616020612118792",
"41012549004942934438353549631928376480",
"287350972187513179145816826727561808322"
]
},
"source": "https://github.com/theonedev/onedev/commit/a4491e5f79dc6cc96eac20972eedc8905ddf6089",
"target": {
"file": "server-core/src/main/java/io/onedev/server/rest/UserResource.java"
},
"deprecated": false,
"signature_type": "Line",
"signature_version": "v1"
}
],
"vanir_signatures_modified": "2026-10-20T14:28:03Z"
}
}
],
"modified": "2026-10-20T14:28:03.889647822Z",
"provider": "osv",
"references": [
"https://github.com/theonedev/onedev/security/advisories/GHSA-66v7-gg85-f4gx",
"https://github.com/theonedev/onedev/commit/a4491e5f79dc6cc96eac20972eedc8905ddf6089"
],
"provider_metadata": {}
},
"related_cves": [
{
"value": "CVE-2021-21246",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 389003,
"published_at": "2021-01-15T21:15:13.49+00:00"
}