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

VectorAV: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

Related Identifiers

CVE-2021-21428
GHSA-23X4-M842-FMWF

Affected Products

Openapi-Generator-Online