CVE-2021-21363
published medium CVSS 3.1 · 5.3Generator Web Application: Local Privilege Escalation Vulnerability via System Temp Directory
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's temporary directory is shared between all users on that system. A collocated user can observe the process of creating a temporary sub directory in the shared temporary directory and race to complete the creation of the temporary subdirectory. This vulnerability is local privilege escalation because the contents of the `outputFolder` can be appended to by an attacker. As such, code written to this directory, when executed can be attacker controlled. For more details refer to the referenced GitHub Security Advisory. This vulnerability is fixed in version 2.4.19. Note this is a distinct vulnerability from CVE-2021-21364.
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:N/I:H/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
2- CWE-379 CWE-379 Creation of Temporary File in Directory with Incorrect Permissions
- CWE-378 CWE-378: Creation of Temporary File With Insecure Permissions
References
2Provider assertions
2GitHub_M · cna
Generator Web Application: Local Privilege Escalation Vulnerability via System Temp Directory
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 6743231fe64ea437325846c0b75f454d327b4df3822997f27c25ee5fc62c63df
- Ingested
- 23 Sep 2026, 07:52:31 UTC
- Source record
- Official CVE record