CVE-2021-21430
MEDIUMOpenAPI Generator < 5.1.1 - Insecure Temporary File Creation via File.createTempFile
Title source: llmDescription
OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec. Using `File.createTempFile` in JDK will result in creating and using insecure temporary files that can leave application and system data vulnerable to attacks. Auto-generated code (Java, Scala) that deals with uploading or downloading binary data through API endpoints will create insecure temporary files during the process. Affected generators: `java` (jersey2, okhttp-gson (default library)), `scala-finch`. The issue has been patched with `Files.createTempFile` and released in the v5.1.0 stable version.
References (3)
Core 3
Core References
Exploit, Third Party Advisory x_refsource_confirm
https://github.com/OpenAPITools/openapi-generator/security/advisories/GHSA-cqxr-xf2w-943w
Patch, Third Party Advisory x_refsource_misc
https://github.com/OpenAPITools/openapi-generator/pull/8791
Patch, Third Party Advisory x_refsource_misc
https://github.com/OpenAPITools/openapi-generator/pull/8787
Scores
CVSS v3
6.2
EPSS
0.0040
EPSS Percentile
32.0%
Attack Vector
LOCAL
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Details
CWE
CWE-269
CWE-668
Status
published
Products (2)
openapi-generator/openapi_generator
< 5.1.1
org.openapitools/openapi-generator
0 - 5.1.0Maven
Published
May 10, 2021
Tracked Since
Feb 18, 2026