{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2021-21429","id":"CVE-2021-21429","title":"Creation of Temporary File in Directory with Insecure Permissions in the OpenAPI Generator Maven plugin","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 h","descriptionLong":"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.","published":"2021-04-27T20:00:18.000Z","updated":"2026-10-20T10:55:20.221068148Z","reserved":"2020-12-22T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","rating":"medium","source":"GitHub_M"},"metrics":[{"version":"3.1","score":4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","rating":"medium","source":"GitHub_M"},{"version":"3.1","score":4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","rating":"medium","source":"github.com"},{"version":"3.1","score":3.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","rating":"low","source":"NVD"},{"version":"3.1","score":3.3,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","rating":"low","source":"OSV"},{"version":"3.1","score":4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","rating":"medium","source":"GitHub"},{"version":"2.0","score":2.1,"vector":"AV:L/AC:L/Au:N/C:P/I:N/A:N","rating":"low","source":"NVD"}],"rating":"medium","products":["OpenAPITools openapi-generator"],"affectedProducts":[{"vendor":"OpenAPITools","product":"openapi-generator","defaultStatus":null,"versions":[{"status":"affected","version":"< 5.1.0"}],"platforms":[]}],"packages":[{"ecosystem":"Maven","name":"org.openapitools:openapi-generator-maven-plugin","purl":"pkg:maven/org.openapitools/openapi-generator-maven-plugin","ranges":["<5.1.0"],"fixed":["5.1.0"],"advisory":"GHSA-867q-77cc-98mv"}],"cwes":["CWE-552","CWE-377","CWE-378","CWE-379"],"aliases":["GHSA-867q-77cc-98mv"],"references":[{"url":"https://github.com/OpenAPITools/openapi-generator/security/advisories/GHSA-867q-77cc-98mv","tags":["x_refsource_CONFIRM","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://github.com/OpenAPITools/openapi-generator/pull/8795","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-21429","tags":["advisory"]},{"url":"https://github.com/OpenAPITools/openapi-generator/blob/06ad7a51eff04393203cfa715e54e1fb59d984fe/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java#L782-L799","tags":["web"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.00296,"epssPercentile":0.22609,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2021-21429","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-21429","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2021-21429","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-867q-77cc-98mv","ok":true,"note":"GHSA-867q-77cc-98mv"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2021-21429","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}