CVE-2021-21430Creation of Temporary File in Directory with Insecure Permissions in auto-generated Java, Scala code
- 6.2MediumCVSS base score
- 0.40%Exploitation in 30 daysEPSS · top 65% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
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.
Timeline
ID reserved
By GitHub_M
- 5 months later
· 5 months later
Published
- 3 years later
· 3 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | Medium6.2 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| NVDNVD · Modified | 3.1 | Medium5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N |
- EPSS (exploitation in 30 days)
- 0.40% · top 65% of all CVEs (18 Nov 2026)
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 6.2.
Affected products
OpenAPITools · openapi-generator
- affected < 5.1.0
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- Mavenorg.openapitools:openapi-generatorGHSA-cqxr-xf2w-943w (opens in a new tab)
References
References3
- https://github.com/OpenAPITools/openapi-generator/security/advisories/GHSA-cqxr-xf2w-943w (opens in a new tab)x_refsource_CONFIRMx_transferred
- https://github.com/OpenAPITools/openapi-generator/pull/8791 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/OpenAPITools/openapi-generator/pull/8787 (opens in a new tab)x_refsource_MISCx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2021-1049 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-cqxr-xf2w-943w (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2021-21430)Record last updated .