Read the docs
TI-2021-04463 Aliases CVE-2021-21364GHSA-hpv8-9rq5-hq7w

Generated Code Contains Local Information Disclosure Vulnerability

Priority LOW 25CWE-200Published · Updated

Key facts

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

Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-200.

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 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.

Why it matters now

EPSS 0.00282 20th percentileScored 2026-11-07
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-hpv8-9rq5-hq7w
  • 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-hpv8-9rq5-hq7w

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-hpv8-9rq5-hq7w 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-21364
  2. 2026-10-03 Alias added: GHSA-hpv8-9rq5-hq7w

References

  • TI-2021-04462 Generator Web Application: Local Privilege Escalation Vulnerability via System Temp Directory CVSS 3.1HIGH 7.0

Sources