CVE-2021-21429 json
Creation of Temporary File in Directory with Insecure Permissions in the OpenAPI Generator Maven plugin
published 2021-04-27 5 y ago modified 2026-07-08 4 mo ago also GHSA-867q-77cc-98mv , EUVD-2021-0794
- cvss
- 4.0
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.3%
- EPSS 0.3% chance of exploitation in 30 days, percentile 22%
- public exploits
- 0
- none known
Summary
OpenAPI Generator allows generation of API client libraries, 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. OpenAPI Generator maven plug-in creates insecure temporary files during the process. The issue has been patched with `Files.createTempFile` and released in the v5.1.0 stable version.
Patch / fix
- maven org.openapitools:openapi-generator-maven-plugin 5.1.0
- openapi-generator openapi_generator 5.1.0
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-21429 updated cvss 6.2
openapi-generator: Using File.createTempFile in JDK results in creating insecure temporary files
-
Red Hat Advanced Cluster Management for Kubernetes 2 openapi-generatornot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
0.30% chance of exploitation in the next 30 days, higher than 22% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 4.0 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
| NVD | 3.1 | 3.3 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N |
| NVD | 2.0 | 2.1 | AV:L/AC:L/Au:N/C:P/I:N/A:N |
| GitHub | 3.1 | 4.0 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| maven | org.openapitools:openapi-generator-maven-plugin | <5.1.0 |
5.1.0 |
Affected products
- OpenAPITools openapi-generator
Classification
References
-
github.com
/OpenAPITools/openapi-generator/pull/8795
web, patch, third-party-advisory
-
github.com
/OpenAPITools/openapi-generator/security/advisories/GHSA-867q-77cc-98mv
web, patch, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-21429
advisory
-
github.com
/OpenAPITools/openapi-generator/blob/06ad7a51eff04393203cfa715e54e1fb59d984fe/modules/openapi-generator-maven-
web
Sources
- CVE List CVE-2021-21429
- GitHub Advisory GHSA-867q-77cc-98mv
- NVD CVE-2021-21429
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.