Read the docs
TI-2021-04462 Aliases CVE-2021-21363GHSA-pc22-3g76-gm6j

Generator Web Application: Local Privilege Escalation Vulnerability via System Temp Directory

Priority LOW 31CWE-378Published · Updated

Key facts

Attack vector
Local
Privileges required
Low
User interaction
None
Attack complexity
High
Impact type
—
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub.

Summary

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.

Why it matters now

EPSS 0.00414 35th percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Fixed swagger-codegen (swagger-api): 2.4.19io.swagger:swagger-codegen (Maven): 2.4.19

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
swagger-apiswagger-codegenbefore 2.4.192.4.19Patch availableCNA
—io.swagger:swagger-codegen (Maven)before 2.4.192.4.19Patch availableGHSA-pc22-3g76-gm6j
  • swagger-codegen Vendorswagger-api Affected before 2.4.19 Fixed in 2.4.19 Patch available CNA
  • io.swagger:swagger-codegen (Maven) Vendor— Affected before 2.4.19 Fixed in 2.4.19 Patch available GHSA-pc22-3g76-gm6j

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:smartbear:swagger-codegen:*:*:*:*:*:*:*:*before 2.4.19VulnerableSMARTBEAR
  • cpe:2.3:a:smartbear:swagger-codegen:*:*:*:*:*:*:*:* Versions before 2.4.19 Vulnerable ·SMARTBEAR

Remediation

  • Fix · CNA swagger-codegen (swagger-api) Fixed in 2.4.19
  • Fix · GHSA-pc22-3g76-gm6j io.swagger:swagger-codegen (Maven) Fixed in 2.4.19 Advisory →

Vendor assessments

Red Hat

Red Hat's page for this CVE →

Not affected: 1 product
  • Red Hat

Timeline

  1. 2026-10-02 Threatist record created from CVE-2021-21363
  2. 2026-10-03 Alias added: GHSA-pc22-3g76-gm6j

References

  • TI-2021-04463 Generated Code Contains Local Information Disclosure Vulnerability CVSS 3.1MEDIUM 5.5

Sources