CVE-2021-21430

MEDIUM

OpenAPI Generator < 5.1.1 - Insecure Temporary File Creation via File.createTempFile

Title source: llm
STIX 2.1

Description

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