CVE-2021-21363 in Smartbear Swagger-Codegen
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 bet...
Affects 1 product from 1 vendor. Facts below cite their sources.
Requires local access, high complexity, low privileges required, no user interaction needed, impact contained to the vulnerable component, full confidentiality impact, full integrity impact, full availability impact.
Affected products and versions
| Vendor | Product | Affected versions |
|---|---|---|
| Smartbear | Swagger-Codegen | < 2.4.19 |
A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.
Fix and vendor advisory
No official vendor advisory link on record. See the CVE record.
Exploitation
| CISA known-exploited | Not in the CISA KEV catalog |
|---|---|
| Public exploit | Not confirmed |
Official 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.
Source: NIST NVD / MITRE CVE.
Record details
| CVE ID | CVE-2021-21363 |
|---|---|
| BreachSpider ID | BS-2021-GLOBAL-241038-H |
| CVSS vector | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H |
| Published | 2021-03-11 |
| Last modified | 2026-06-17 |
| Weakness (CWE) | |
| Source | NVD |
Weakness definitions
CWE-378: CWE-378
CWE-379: CWE-379
Analysis AI-written, not human-reviewed
A vulnerability in swagger-codegen before version 2.4.19 allows a collocated user to observe the process of creating API clients and server stubs, potentially exposing sensitive information stored in the system's temporary directory.
The vulnerability arises from the use of a shared system's temporary directory for storing intermediate files during the generation of API clients and server stubs. This allows any user with access to the same system to potentially read these files, leading to the exposure of sensitive data.
Questions
What is CVE-2021-21363?
A vulnerability in swagger-codegen before version 2.4.19 allows a collocated user to observe the process of creating API clients and server stubs, potentially exposing sensitive information stored in the system's temporary directory.
What is the CVSS score for CVE-2021-21363?
CVE-2021-21363 has CVSS 7.0 (High). Vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H. EPSS: 0.4%.
Is CVE-2021-21363 actively exploited?
No confirmed active exploitation of CVE-2021-21363 as of 2026-09-25.
How do I remediate CVE-2021-21363?
Priority: MEDIUM.
What systems are affected by CVE-2021-21363?
CVE-2021-21363 affects Smartbear Swagger-Codegen.
For developers and AI agents
Run this check from your own code or agent
REST API
curl -s https://breachspider.com/api/v1/assets/correlate-cves \
-H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"assets":[{"asset_id":"dev-1","vendor":"Smartbear","product":"Swagger-Codegen","version":"1.0"}]}'
MCP for AI agents
# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp
Free trial: 14 days, 750 device checks, no card.
Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-06-17.