CVE-2021-21245CWE-434

Pre-Auth Arbitrary File Upload

Critical · published January 15, 2021

CVSS v3.1
10.0
EPSS
1%
Percentile
68.3
In the wild
Unconfirmed
What it is

🔥 Just one crafty upload could let attackers stash a web shell on your OneDev server! Think of this like a hotel where you can book a room simply by naming it, with no one checking who you really are. An attacker could easily 'check in' their own malicious files without a hitch, exploiting this oversight to gain access. This vulnerability allows attackers to upload arbitrary files to your server, potentially leading to full control over your OneDev installation. Imagine a scenario where sensitive data is exposed or even worse, your entire development pipeline is compromised by a sneaky web shell! This is absolutely devastating and needs your immediate attention.

Put simply

Think of this like a hotel where you can book a room simply by naming it, with no one checking who you really are. An attacker could easily 'check in' their own malicious files without a hitch, exploiting this oversight to gain access. In OneDev versions before 4.0.3, the AttachmentUploadServlet improperly saves user-controlled data to a location specified by the user, allowing malicious files to be uploaded. The flaw arises from a lack of validation on the filename header, which can lead to an arbitrary file upload vulnerability.

What to do

This vulnerability allows attackers to upload arbitrary files to your server, potentially leading to full control over your OneDev installation. Imagine a scenario where sensitive data is exposed or even worse, your entire development pipeline is compromised by a sneaky web shell! This is absolutely devastating and needs your immediate attention. To secure your system, upgrade OneDev to version 4.0.3 or later immediately. Additionally, regularly audit your file upload mechanisms to ensure they are properly validating inputs and restricting uploads to safe directories. Be proactive and review your server's configurations! You've got this! Follow these steps, and you'll bolster your defenses in no time. 🛡️

The record
Technical detail
CVSS v3.1
10.0 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N
CVSS v4.0
Not supplied
EPSS
0.01213 · 68.3th percentile
Weakness
CWE-434 · Unrestricted Upload of File with Dangerous Type
Published
2021-01-15T20:10Z
EPSS history
Timeline
  • 15 JAN 20:10Z
    Pre-Auth Arbitrary File Upload
    cvelistv5