{"id":"CVE-2021-21429","published":"2021-04-27T20:00:18Z","modified":"2024-08-03T18:09:16Z","title":"Creation of Temporary File in Directory with Insecure Permissions in the OpenAPI Generator Maven plugin","vendor":"OpenAPITools","product":"openapi-generator","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":4,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00296,"percentile":0.14649,"provenance":"source"},"cwes":[{"id":"CWE-552","name":"Files or Directories Accessible to External Parties"}],"references":[{"url":"https://github.com/OpenAPITools/openapi-generator/security/advisories/GHSA-867q-77cc-98mv","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/OpenAPITools/openapi-generator/pull/8795","tags":["x_refsource_MISC"]}],"priority":{"score":5.7,"factors":[{"name":"EPSS percentile","points":2.93},{"name":"CVSS severity","points":2.8}]},"vendorSlug":"openapitools","affectedVersions":[{"vendor":"OpenAPITools","product":"openapi-generator","versions":["< 5.1.0"]}],"affected":[{"ecosystem":"Maven","package":"org.openapitools:openapi-generator-maven-plugin","vulnerableRanges":["<5.1.0"],"patched":["5.1.0"],"from":["GHSA-867q-77cc-98mv"],"provenance":"source"}],"summary":{"text":"The OpenAPI Generator Maven plugin, part of the openapi-generator project from OpenAPITools, creates temporary files using the JDK's File.createTempFile method, which produces files with insecure permissions. An attacker with local access to the system can exploit this to read data held in those temporary files, with no authentication or user interaction required.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:16:13Z"},"euvd":{"id":"EUVD-2021-0794","exploited":false,"provenance":"source"}}