CVE-2021-21428CWE-269

Creation of Temporary File in Directory with Insecure Permissions in the OpenAPI-Generator online generator

Critical · published May 10, 2021

CVSS v3.1
9.3
EPSS
0%
Percentile
27.6
In the wild
Unconfirmed
What it is

🔥 OpenAPI Generator's temporary folders are like leaving your diary open in a crowded café – anyone can peek at your secrets! When OpenAPI generator creates temporary folders for files, it’s like a busy restaurant that doesn’t label its food properly – anyone can grab whatever they want, causing confusion and potential disasters. That’s not how you run a secure kitchen! An attacker could exploit this vulnerability to read sensitive files or even append malicious content, potentially leading to data leaks or compromised API functionality. Imagine the chaos if your private recipes ended up in the wrong hands – absolutely devastating!

Put simply

When OpenAPI generator creates temporary folders for files, it’s like a busy restaurant that doesn’t label its food properly – anyone can grab whatever they want, causing confusion and potential disasters. That’s not how you run a secure kitchen! This vulnerability arises from insecure temporary folder creation via `File.createTempFile`, allowing any user on the system to access and manipulate these files during the code generation process.

What to do

An attacker could exploit this vulnerability to read sensitive files or even append malicious content, potentially leading to data leaks or compromised API functionality. Imagine the chaos if your private recipes ended up in the wrong hands – absolutely devastating! Patch immediately to version 5.1.0 or higher to secure the temporary folder creation. Additionally, ensure access controls are implemented for sensitive directories and conduct a security audit of your OpenAPI specs. You've got this! By taking these steps, you’ll secure your environment and become a security hero! 🛡️

The record
Technical detail
CVSS v3.1
9.3 · CRITICAL
Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.00351 · 27.6th percentile
Weakness
CWE-269 · Improper Privilege Management
Published
2021-05-10T18:50Z
EPSS history
Timeline
  • 10 MAY 18:50Z
    Creation of Temporary File in Directory with Insecure Permissions in the OpenAPI-Generator online generator
    cvelistv5