CVE-2021-21430Openapi-generator Openapi Generator
Medium 5.5
Follow: this CVE · Openapi-generator · Openapi-generator Openapi Generator We alert you by email or Slack (account required).
- Priority
- 33
- CVSS 3.1
- 5.5
- EPSS
- 0.4% probability of exploitation in 30 days · percentile 37
- Auth required
- Yes
- Published
- May 10, 2021
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
What happens
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.
What to do
- Apply the vendor's security update for Openapi Generator.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| Maven | org.openapitools:openapi-generator |
< 5.1.0 |
5.1.0 |
— |
Per OSV / GitHub Advisories (GHSA-cqxr-xf2w-943w). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| openapi-generator | openapi_generator | < 5.1.1 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch Third Party Advisory
- github.com Patch Third Party Advisory
- github.com Exploit Third Party Advisory