CVE-2021-21428: Openapi Generator - Insecure Temporary Folder
- Cve: CVE-2021-21428
- Name: Openapi Generator - Insecure Temporary Folder
- Description: 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.
- Impact: Any user on the system can read and modify temporary files, potentially leading to information disclosure or code execution.
- Remediation: Update to version 5.1.0 or later, which patches the issue with Files.createTempFile.
- Vulnerability type: insecure_deserialization
- Vulnerability impact: information_disclosure, file_system_write
- Requirement type: none
- Labels source: projectdiscovery
- Severity: high
- Cvss score: 7
- Cvss vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
- Epss score: 0.00351
- Epss percentile: 0.29144
- Assignee: [email protected]
- Published at: 2021-05-10T19:15:08Z
- Age in days: 2024
- Modified at: 2026-06-17T03:35:33Z
- Patch available: yes
- Public exploits total: 1
- References total: 2
- Products total: 1
- Oss: yes
- Projects total: 2
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2021-21428
- Nvd status: modified
- Checked, none or zero: known exploited entries, nuclei templates, public exploits capped, rejected by nvd
- Not known: requirements, hackerone
Cwe
| Id | Name |
|---|---|
| CWE-269 | Improper Privilege Management |
| CWE-668 | Exposure of Resource to Wrong Sphere |
Public exploits
| Url | Source | Added date |
|---|---|---|
| https://github.com/OpenAPITools/openapi-generator/security/advisories/GHSA-23x4-m842-fmwf | nvd | 2021-05-10 |
References
| Url | Source | Tags |
|---|---|---|
| https://github.com/OpenAPITools/openapi-generator/pull/8788 | nvd | Patch, Third Party Advisory |
| https://github.com/OpenAPITools/openapi-generator/security/advisories/GHSA-23x4-m842-fmwf | nvd | Exploit, Third Party Advisory |
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| openapi-generator:openapi_generator | < 5.1.0 | no | nvd | /v1/products/openapi-generator/openapi_generator |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| OpenAPITools/openapi-generator | package, pull, security_advisory | yes | /v1/repositories/OpenAPITools/openapi-generator |
| swagger-api/swagger-codegen | security_advisory | yes | /v1/repositories/swagger-api/swagger-codegen |
Index
- Checked, none or zero: repositories, repositories high signal, packages
Exploitation
- Public exploit: yes
- Public exploit count: 1
- Public exploit first date: 2021-05-10
- Authentication required: yes
- Checked, none or zero: known exploited, known exploited by, exploitation seen, initial access, remote
- Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since, hackerone reports, exposed hosts