PT-2021-14500 · Unknown · Openapi-Generator-Online
Jlleitschuh
+1
·
Published
2021-05-10
·
Updated
2023-06-30
·
CVE-2021-21428
CVSS v3.1
9.3
Critical
| Vector | AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H |
Name of the Vulnerable Software and Affected Versions
openapi-generator-online versions prior to 5.1.0
Description
The openapi-generator-online tool creates insecure temporary folders during the code generation process, allowing any user on the system to read and append to the auto-generated files. This issue can lead to local privilege escalation, as an attacker can observe the creation of a temporary subdirectory and race to complete its creation, potentially executing attacker-controlled code. The vulnerability exists due to a race condition between the deletion of a randomly generated temporary file and the creation of the temporary directory.
Recommendations
For versions prior to 5.1.0, update to the v5.1.0 stable version, which patches the issue by using
Files.createTempFile instead of File.createTempFile. As a temporary workaround, consider restricting access to the temporary directory to minimize the risk of exploitation.Exploit
Fix
Improper Privilege Management
Exposure of Resource to Wrong Sphere
Found an issue in the description? Have something to add? Feel free to write us 👾
Related Identifiers
Affected Products
Openapi-Generator-Online