{"cve":"CVE-2021-21363","nvd":{"published":"2021-03-11T03:15:11.977","modified":"2026-06-17T03:35:23.627","status":"Modified","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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.0},"cwes":["CWE-378","CWE-379"],"references":["https://github.com/swagger-api/swagger-codegen/commit/987ea7a30b463cc239580d6ad166c707ae942a89","https://github.com/swagger-api/swagger-codegen/security/advisories/GHSA-pc22-3g76-gm6j","https://github.com/swagger-api/swagger-codegen/commit/987ea7a30b463cc239580d6ad166c707ae942a89","https://github.com/swagger-api/swagger-codegen/security/advisories/GHSA-pc22-3g76-gm6j"],"products":["smartbear:swagger-codegen"],"source":"nvd","synced_at":"2026-10-19T21:15:50.279857260+00:00"},"epss":{"cve":"CVE-2021-21363","score":0.00414,"percentile":0.35747,"date":"2026-11-01"},"kev":null,"osv":[{"id":"GHSA-pc22-3g76-gm6j","url":"https://osv.dev/vulnerability/GHSA-pc22-3g76-gm6j","summary":"Generator Web Application: Local Privilege Escalation Vulnerability via System Temp Directory","modified":"2026-07-08T06:00:38.991798225Z","packages":[{"ecosystem":"Maven","name":"io.swagger:swagger-codegen","purl":"pkg:maven/io.swagger/swagger-codegen","ranges":["<2.4.19"],"fixed":["2.4.19"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}