Vulnerability · Published Apr 27, 2021 · Assigned by GitHub_M
CVE-2021-21429Creation of Temporary File in Directory with Insecure Permissions in the OpenAPI Generator Maven plugin
Medium 4.0
In plain English
A medium-severity security flaw in openapi-generator from OpenAPITools. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 22% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Maven | org.openapitools:openapi-generator-maven-plugin | 5.1.0 | GHSA-867q-77cc-98mv |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| OpenAPITools | openapi-generator | < 5.1.0 |
Weakness: CWE-552 · Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
References
- https://github.com/OpenAPITools/openapi-generator/security/advisories/GHSA-867q-77cc-98mv x_refsource_CONFIRM
- https://github.com/OpenAPITools/openapi-generator/pull/8795 x_refsource_MISC