Skip to content
Fencer Vulns
medium 4.0

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-generator
    not 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

Weakness
  • CWE-552 Files or Directories Accessible to External Parties
  • CWE-377 DEPRECATED: Insecure Temporary File
  • CWE-378 Creation of Temporary File With Insecure Permissions
  • CWE-379 Creation of Temporary File in Directory with Insecure Permissions

References

Sources

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.