CVE-2021-21429
lowpriority · track · 13EPSS 0.003 · 22 %ileEUUSEPSS · scored 2026-10-27
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.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · low–medium · 2.1–4
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (3)
Products and version ranges known to be affected.
- openapi-generator openapi generator< 5.1.0nvdUScpe:2.3:a:openapi-generator:openapi_generator:*:*:*:*:*:*:*:*
- Maven org.openapitools:openapi-generator-maven-plugin< 5.1.0osvUSpkg:maven/org.openapitools/openapi-generator-maven-plugin
advisories (1)
Vendor and ecosystem advisories describing this.
- GHSA-867q-77cc-98mvCreation of Temporary File in Directory with Insecure Permissions in the OpenAPI Generator Maven plugin2021-04-29ghsa · osvUS
### Impact Using `File.createTempFile` in JDK will result in creating and using insecure temporary files that can leave application and system data vulnerable to attacks. This vulnerability only impacts unix-like systems where the local system temporary directory is shared between all users. This vulnerability does not impact Windows or modern versions of MacOS. OpenAPI Generator Maven plug-in creates insecure temporary files during the code generation process. It creates insecure temporary files to store the OpenAPI specification files provided by the users and these temporary files can be read by any users in the system. The impact of this vulnerability is information disclosure of the contents of the specification file to other local users. ### Patches The issue has been patched with `Files.createTempFile` and released in the v5.1.0 stable version. ### For more information If you have any questions or comments about this advisory: * Open an issue in [OpenAPI Generator Github repo](https://github.com/openAPITools/openapi-generator/) * Email us at [security@openapitools.org](mailto:security@openapitools.org)
also known as (3)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (7)
External citations — patches, advisories, analysis.
- https://github.com/OpenAPITools/openapi-generator/pull/8795cnnvd
- https://github.com/OpenAPITools/openapi-generator/security/advisories/GHSA-867q-77cc-98mvcnnvd
- https://nvd.nist.gov/vuln/detail/CVE-2021-21429cnnvd
- https://github.com/OpenAPITools/openapi-generator/pull/8795enisa_euvd
- https://github.com/OpenAPITools/openapi-generator/security/advisories/GHSA-867q-77cc-98mvenisa_euvd
- https://github.com/OpenAPITools/openapi-generator/pull/8795PatchThird Party Advisorynvd
- https://github.com/OpenAPITools/openapi-generator/security/advisories/GHSA-867q-77cc-98mvPatchThird Party Advisorynvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan