Arbitrary file upload in Onedev Project
CVE-2021-21245
OneDev is an all-in-one devops platform. In OneDev before version 4.0.3, AttachmentUploadServlet also saves user controlled data (`request.getInputStream()`) to a user specified location (`request.getHeader("File-Name")`). This issue may lead to arbitrary file upload which can be used to upload a WebShell to OneDev server. This issue is addressed in 4.0.3 by only allowing uploaded file to be in attachments folder. The webshell issue is not possible as OneDev never executes files in attachments folder.
Vulnerability class: Unrestricted File Upload
Published · last modified .
CVSS v3 metric
CVSS v3 base score 10.0 (Critical). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N.
EPSS exploit prediction
EPSS 0.012, 69.0th percentile (scored ); unchanged over 30 days. About EPSS.
Affected products
- Onedev Project
- Theonedev Onedev — versions < 4.0.3
Weakness classification (CWE)
References
- github.com/theonedev/onedev/security/advisories/GHSA-62m2-38q5-96w9 (Third Party Advisory)
- github.com/theonedev/onedev/commit/0c060153fb97c0288a1917efdb17cc426934dacb (Patch, Third Party Advisory)