PT-2021-14445 · Oracle · Jdk
Frantuma
+1
·
Published
2021-03-11
·
Updated
2021-03-18
·
CVE-2021-21363
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
swagger-codegen versions prior to 2.4.19
Description
The system's temporary directory is shared between all users on Unix-like systems, allowing a collocated user to observe and race to complete the creation of a temporary subdirectory. This is a local privilege escalation issue because an attacker can append to the contents of the
outputFolder and control code written to this directory when executed. The method File.createTempFile from the JDK is vulnerable to this local information disclosure issue.Recommendations
For versions prior to 2.4.19, update to version 2.4.19 to fix the vulnerability. As a temporary workaround, consider avoiding the use of the
File.createTempFile method and instead use the Files API for creating temporary directories, which does not contain the race condition and sets the correct file permissions. Restrict access to the temporary directory to minimize the risk of exploitation.Exploit
Fix
Found an issue in the description? Have something to add? Feel free to write us 👾
Related Identifiers
Affected Products
Jdk