Live threats

All CVEs / Openapi-generator

CVE-2021-21430Openapi-generator Openapi Generator

Medium 5.5

Priority
33
CVSS 3.1
5.5
EPSS
0.4%
probability of exploitation in 30 days · percentile 37
Auth required
Yes
Published
May 10, 2021
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-269, CWE-668
Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

What happens

OpenAPI Generator allows generation of API client libraries (SDK generation), 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. Auto-generated code (Java, Scala) that deals with uploading or downloading binary data through API endpoints will create insecure temporary files during the process. Affected generators: `java` (jersey2, okhttp-gson (default library)), `scala-finch`. The issue has been patched with `Files.createTempFile` and released in the v5.1.0 stable version.

Original NVD text.

What to do

  1. Apply the vendor's security update for Openapi Generator.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
Maven org.openapitools:openapi-generator < 5.1.0 5.1.0 —

Per OSV / GitHub Advisories (GHSA-cqxr-xf2w-943w). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
openapi-generatoropenapi_generator< 5.1.1

Official sources

References

Links published by the sources. Open them with care.