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.

Severity (CVSS 3.1)4.0Medium
Exploit odds (30 days)0.3%top 77.7% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
Mavenorg.openapitools:openapi-generator-maven-plugin5.1.0GHSA-867q-77cc-98mv

Affected products (as reported)

VendorProductVersions
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