CVE-2021-21364
published medium CVSS 3.1 · 5.3Generated Code Contains Local Information Disclosure Vulnerability
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| swagger-api | — | swagger-codegen< 2.4.19 | Affected | Not stated | GitHub_M |
Description
swagger-codegen is an open-source project which contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition. In swagger-codegen before version 2.4.19, on Unix-Like systems, the system temporary directory is shared between all local users. When files/directories are created, the default `umask` settings for the process are respected. As a result, by default, most processes/apis will create files/directories with the permissions `-rw-r--r--` and `drwxr-xr-x` respectively, unless an API that explicitly sets safe file permissions is used. Because this vulnerability impacts generated code, the generated code will remain vulnerable until fixed manually! This vulnerability is fixed in version 2.4.19. Note this is a distinct vulnerability from CVE-2021-21363.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 5.3 / 10
- Severity
- medium
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:H/I:N/A:N
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| swagger-api | swagger-codegen | < 2.4.19 (affected) | GitHub_M · cna |
Weaknesses
3- CWE-200 CWE-200 Information Exposure
- CWE-378 CWE-378: Creation of Temporary File With Insecure Permissions
- CWE-732 CWE-732 Incorrect Permission Assignment for Critical Resource
References
2Provider assertions
2GitHub_M · cna
Generated Code Contains Local Information Disclosure Vulnerability
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 2d4a1aa6da805cdeb97985223416d5c6e7fb619dff1d5920dfa33c19d027b68d
- Ingested
- 23 Sep 2026, 07:52:31 UTC
- Source record
- Official CVE record