{"id":"CVE-2021-21246","published":"2021-01-15T20:10:46Z","modified":"2024-08-03T18:09:15Z","title":"Pre-Auth Access token leak","vendor":"theonedev","product":"onedev","tier":"core","eol":null,"affectedVersions":[{"vendor":"theonedev","product":"onedev","versions":["< 4.0.3"]}],"description":{"text":"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.","provenance":"source","from":"CVE.org"},"summary":{"text":"The OneDev devops platform, before version 4.0.3, exposes an access token leak in the REST UserResource endpoint, where the /users/{id} endpoint lacks the administrator-only authorization check applied to listing users. An attacker with network access and no authentication, and without any user interaction, can retrieve arbitrary user details including Access Tokens, which can then be used to impersonate the affected user, including administrators, through the API or HTTP(S) code cloning.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T06:32:24Z"},"cvss":{"score":8.6,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.49051,"percentile":0.99159,"date":"2026-11-25","provenance":"source"},"kev":null,"vulncheckKev":null,"exploited":false,"otx":{"pulseCount":0,"pulses":[],"provenance":"machine"},"cwes":[{"id":"CWE-862","name":"Missing Authorization"}],"references":[{"url":"https://github.com/theonedev/onedev/security/advisories/GHSA-66v7-gg85-f4gx","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/theonedev/onedev/commit/a4491e5f79dc6cc96eac20972eedc8905ddf6089","tags":["x_refsource_MISC"]}],"techniques":[],"reports":[],"affected":[],"advisories":[],"euvd":{"id":"EUVD-2021-8629","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2021-8629","exploited":false,"exploitedSince":null,"provenance":"source"},"exploits":[],"exploitSources":{"nuclei":[{"id":"CVE-2021-21246","name":"OneDev < 4.0.3 - User Access Token Leak","severity":"high","path":"http/cves/2021/CVE-2021-21246.yaml","url":"https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2021/CVE-2021-21246.yaml"}],"provenance":"source"},"exploitRefs":[],"flow":[],"timeline":[{"date":"2021-01-15","kind":"published","label":"Published (CVE.org)","url":"https://www.cve.org/CVERecord?id=CVE-2021-21246","provenance":"source"}],"speed":{"daysToPublicExploit":null,"firstExploitFrom":null,"daysToKev":null},"priority":{"score":30.9,"factors":[{"name":"In a KEV catalog","points":0.0,"detail":"not listed"},{"name":"Recent KEV listing","points":0.0,"detail":"not listed"},{"name":"Known ransomware use","points":0.0,"detail":"not known"},{"name":"EPSS percentile","points":19.83,"detail":"percentile 0.9916"},{"name":"Named in threat reports","points":0.0,"detail":"0 reports"},{"name":"Public exploit code","points":5.0,"detail":"1 nuclei template"},{"name":"Mentioned in OTX pulses","points":0.0,"detail":"0 pulses"},{"name":"CVSS severity","points":6.02,"detail":"base score 8.6"},{"name":"End-of-life product","points":0.0,"detail":"supported or unknown"}]},"lineage":{"familyId":"fam-theonedev-onedev-cve-2021-21246","children":[{"from":"CVE-2021-21246","to":"CVE-2023-24828","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["server-core/src/main/java/io/onedev/server/model/User.java"],"commits":["https://github.com/theonedev/onedev/commit/a4491e5f79dc6cc96eac20972eedc8905ddf6089","https://github.com/theonedev/onedev/commit/d67dd9686897fe5e4ab881d749464aa7c06a68e5"],"basis":"shared function","functions":["initialValue"]}]}]}}