Creation of Temporary File in Directory with Insecure Permissions in the OpenAPI-Generator online generator
Key facts
- Attack vector
- Local
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Privilege escalation
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-269.
Summary
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| OpenAPITools | openapi-generator | before 5.1.0 | 5.1.0 | Patch available | CNA |
| — | org.openapitools:openapi-generator-online (Maven) | before 5.1.0 | 5.1.0 | Patch available | GHSA-23x4-m842-fmwf |
- openapi-generator VendorOpenAPITools Affected before 5.1.0 Fixed in 5.1.0 Patch available CNA
- org.openapitools:openapi-generator-online (Maven) Vendor— Affected before 5.1.0 Fixed in 5.1.0 Patch available GHSA-23x4-m842-fmwf
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:openapi-generator:openapi_generator:*:*:*:*:*:*:*:* | before 5.1.0 | Vulnerable | OpenAPITools |
- cpe:2.3:a:openapi-generator:openapi_generator:*:*:*:*:*:*:*:* Versions before 5.1.0 Vulnerable ·OpenAPITools
Remediation
- Fix · CNA openapi-generator (OpenAPITools) Fixed in 5.1.0
- Fix · GHSA-23x4-m842-fmwf org.openapitools:openapi-generator-online (Maven) Fixed in 5.1.0 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2021-21428
- 2026-10-03 Alias added: GHSA-23x4-m842-fmwf
References
Other 3
- https://github.com/swagger-api/swagger-codegen/security/advisories/GHSA-pc22-3g76-gm6j
- https://github.com/OpenAPITools/openapi-generator
- https://github.com/OpenAPITools/openapi-generator/blob/c6530519975341d7784a252132b2f0854f488901/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/service/Generator.java#L184-L187
More OpenAPITools Openapi Generator vulnerabilities
- TI-2023-11951 openapi-generator up to v6.4.0 was discovered to contain a Server-Side Request Forgery… CVSS 3.1CRITICAL 9.1
- TI-2019-08521 OpenAPI Tools OpenAPI Generator before 4.0.0-20190419.052012-560 uses http:// URLs in… CVSS 3.0HIGH 8.1
- TI-2021-04528 Creation of Temporary File in Directory with Insecure Permissions in auto-generated Java, Scala code CVSS 3.1MEDIUM 6.2
- TI-2021-04527 Creation of Temporary File in Directory with Insecure Permissions in the OpenAPI Generator Maven plugin CVSS 3.1MEDIUM 4.0
Sources
- CVE-2021-21428 · CVE Program
- CVE-2021-21428 · NVD
- FIRST EPSS
- GHSA-23x4-m842-fmwf · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences