{"id":"CVE-2021-21251","published":"2021-01-15T20:10:14Z","modified":"2024-08-03T18:09:14Z","title":"ZipSlip Arbitrary File Upload","vendor":"theonedev","product":"onedev","tier":"tail","description":{"text":"OneDev is an all-in-one devops platform. In OneDev before version 4.0.3 there is a critical \"zip slip\" vulnerability. This issue may lead to arbitrary file write. The KubernetesResource REST endpoint untars user controlled data from the request body using TarUtils. TarUtils is a custom library method leveraging Apache Commons Compress. During the untar process, there are no checks in place to prevent an untarred file from traversing the file system and overriding an existing file. For a successful exploitation, the attacker requires a valid __JobToken__ which may not be possible to get without using any of the other reported vulnerabilities. But this should be considered a vulnerability in `io.onedev.commons.utils.TarUtils` since it lives in a different artifact and can affect other projects using it. This issue was addressed in 4.0.3 by validating paths in tar archive to only allow them to be in specified folder when extracted.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.7,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.11317,"percentile":0.96082,"provenance":"source"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"references":[{"url":"https://github.com/theonedev/onedev/security/advisories/GHSA-2w6j-wc8c-9mq2","tags":["x_refsource_CONFIRM"]}],"priority":{"score":24.6,"factors":[{"name":"EPSS percentile","points":19.22},{"name":"CVSS severity","points":5.39}]},"vendorSlug":"theonedev","affectedVersions":[{"vendor":"theonedev","product":"onedev","versions":["< 4.0.3"]}],"euvd":{"id":"EUVD-2021-8634","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-theonedev-onedev-cve-2021-21251","children":[{"from":"CVE-2021-21251","to":"CVE-2026-49248","relation":"incomplete-fix","confidence":"high","kind":"lineage","evidence":[{"kind":"text","provenance":"source","relation":"incomplete-fix","quote":"This is an incomplete fix bypass of CVE-2021-21251 (GHSA-2w6j-wc8c-9mq2): that patch blocked .. path segments but did not address absolute symlink targets.","from":"CVE.org","in":"CVE-2026-49248"}]}]}}