CVE-2021-21428
HIGH 7.0CVSS 3.1Creation of Temporary File in Directory with Insecure Permissions in the OpenAPI-Generator online generator
Openapi generator is a java tool which allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec. openapi-generator-online creates insecure temporary folders with File.createTempFile during the code generation process. The insecure temporary folders store the auto-generated files which can be read and appended to by any users on the system. The issue has been patched with Files.createTempFile and released in the v5.1.0 stable version.
- Published
- 10 May 2021
- Last modified
- 8 Jul 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-269CWE-377CWE-378CWE-379CWE-668
- Also known as
- GHSA-23x4-m842-fmwf
- Sources
- NVDJSONOSV GHSA-23x4-m842-fmwfJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | CRITICAL 9.3 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H |
| OSV | GitHub | CVSS 3.1 | CRITICAL 9.3 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.0 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 4.4 | AV:L/AC:M/Au:N/C:P/I:P/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | openapi-generator | openapi_generatorcpe:2.3:a:openapi-generator:openapi_generator:*:*:*:*:*:*:*:* |
< 5.1.0 | 5.1.0 |
| OSV | Maven | org.openapitools:openapi-generator-online | < 5.1.0 | 5.1.0 |
References
- https://github.com/OpenAPITools/openapi-generator/pull/8788 · Patch, Third Party Advisory, WEB
- https://github.com/OpenAPITools/openapi-generator/security/advisories/GHSA-23x4-m842-fmwf · Exploit, Third Party Advisory, WEB
- https://github.com/swagger-api/swagger-codegen/security/advisories/GHSA-pc22-3g76-gm6j · WEB
- https://nvd.nist.gov/vuln/detail/CVE-2021-21428 · ADVISORY
- https://github.com/OpenAPITools/openapi-generator · PACKAGE
- https://github.com/OpenAPITools/openapi-generator/blob/c6530519975341d7784a252132b2f0854f488901/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/service/Generator.java#L184-L187 · WEB
History
- 25 Nov 2026 20:33 UTC · NVD: first stored (published 10 May 2021)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 11 May 2021)