### [CVE-2021-21242](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-21242) ![](https://img.shields.io/static/v1?label=Product&message=onedev&color=blue) ![](https://img.shields.io/static/v1?label=Version&message=%3C%204.0.3%20&color=brightgreen) ![](https://img.shields.io/static/v1?label=Vulnerability&message=CWE-74%20Improper%20Neutralization%20of%20Special%20Elements%20in%20Output%20Used%20by%20a%20Downstream%20Component%20('Injection')&color=brightgreen) ### Description OneDev is an all-in-one devops platform. In OneDev before version 4.0.3, there is a critical vulnerability which can lead to pre-auth remote code execution. AttachmentUploadServlet deserializes untrusted data from the `Attachment-Support` header. This Servlet does not enforce any authentication or authorization checks. This issue may lead to pre-auth remote code execution. This issue was fixed in 4.0.3 by removing AttachmentUploadServlet and not using deserialization ### POC #### Reference - https://github.com/theonedev/onedev/security/advisories/GHSA-5q3q-f373-2jv8 #### Github - https://github.com/EdgeSecurityTeam/Vulnerability - https://github.com/tzwlhack/Vulnerability