CVE-2022-27140

An arbitrary file upload vulnerability in the file upload module of express-fileupload 1.3.1 allows attackers to execute arbitrary code via a crafted PHP file

published April 12, 2022

CVSS
—
EPSS
3%
Percentile
86.7
In the wild
Unconfirmed
What it is

⚠️ An arbitrary file upload vulnerability lurks in express-fileupload 1.3.1, allowing attackers to slip in a crafted PHP file and run code as they please! 🔥 Picture a restaurant where the chef has no idea what's being delivered. A cook could easily toss in a hidden ingredient without checking the order, potentially ruining the dish or causing chaos in the kitchen! If exploited, an attacker could upload a malicious PHP file that executes arbitrary code on the server, leading to severe consequences like data theft or complete server compromise. This is like letting a chef decide the menu, even if they have no clue about what's safe to serve!

Put simply

Picture a restaurant where the chef has no idea what's being delivered. A cook could easily toss in a hidden ingredient without checking the order, potentially ruining the dish or causing chaos in the kitchen! This vulnerability arises from the express-fileupload module's lack of checks on file types and names, allowing attackers to misuse the API for uploading harmful files without proper validation.

What to do

If exploited, an attacker could upload a malicious PHP file that executes arbitrary code on the server, leading to severe consequences like data theft or complete server compromise. This is like letting a chef decide the menu, even if they have no clue about what's safe to serve! To safeguard your application, update express-fileupload to the latest version that addresses this issue, and implement strict file validation measures to ensure only safe file types are uploaded. Don't forget to review your application's logic to prevent unintentional misuse! You've got this! With these steps, your application will be safer in no time! 🛡️

The record
Technical detail
CVSS
Not scored
CVSS v4.0
Not supplied
EPSS
0.02861 · 86.7th percentile
Published
2022-04-12T00:00Z
EPSS history
Timeline
  • 12 APR 00:00Z
    An arbitrary file upload vulnerability in the file upload module of express-fileupload 1.3.1 allows attackers to execute arbitrary code via a crafted PHP file
    cvelistv5