CVE-2021-21429
LOW 3.3CVSS 3.1Creation of Temporary File in Directory with Insecure Permissions in the OpenAPI Generator Maven plugin
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.
- Published
- 27 Apr 2021
- Last modified
- 8 Jul 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-377CWE-378CWE-379CWE-552
- Also known as
- GHSA-867q-77cc-98mv
- Sources
- NVDJSONOSV GHSA-867q-77cc-98mvJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 4.0 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 4.0 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | LOW 3.3 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | LOW 2.1 | AV:L/AC:L/Au:N/C:P/I:N/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | openapi-generator | openapi_generatorcpe:2.3:a:openapi-generator:openapi_generator:*:*:*:*:*:*:*:* |
< 5.1.0 | 5.1.0 |
| OSV | Maven | org.openapitools:openapi-generator-maven-plugin | < 5.1.0 | 5.1.0 |
References
- https://github.com/OpenAPITools/openapi-generator/pull/8795 · Patch, Third Party Advisory, WEB
- https://github.com/OpenAPITools/openapi-generator/security/advisories/GHSA-867q-77cc-98mv · Patch, Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2021-21429 · ADVISORY
- https://github.com/OpenAPITools/openapi-generator/blob/06ad7a51eff04393203cfa715e54e1fb59d984fe/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java#L782-L799 · WEB
History
- 25 Nov 2026 20:33 UTC · NVD: first stored (published 27 Apr 2021)
- 25 Nov 2026 20:13 UTC · OSV: first stored (published 29 Apr 2021)