{"cve":"CVE-2021-21430","nvd":{"published":"2021-05-10T20:15:07.840","modified":"2026-06-17T03:35:33.643","status":"Modified","description":"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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","score":5.5},"cwes":["CWE-668","CWE-269"],"references":["https://github.com/OpenAPITools/openapi-generator/pull/8787","https://github.com/OpenAPITools/openapi-generator/pull/8791","https://github.com/OpenAPITools/openapi-generator/security/advisories/GHSA-cqxr-xf2w-943w","https://github.com/OpenAPITools/openapi-generator/pull/8787","https://github.com/OpenAPITools/openapi-generator/pull/8791"],"products":["openapi-generator:openapi_generator"],"source":"nvd","synced_at":"2026-10-19T21:18:09.669877188+00:00"},"epss":{"cve":"CVE-2021-21430","score":0.00404,"percentile":0.34652,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-cqxr-xf2w-943w","url":"https://osv.dev/vulnerability/GHSA-cqxr-xf2w-943w","summary":"Creation of Temporary File in Directory with Insecure Permissions in auto-generated Java, Scala code","modified":"2026-07-08T06:28:34.537051285Z","packages":[{"ecosystem":"Maven","name":"org.openapitools:openapi-generator","purl":"pkg:maven/org.openapitools/openapi-generator","ranges":["<5.1.0"],"fixed":["5.1.0"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}