# CVE-2021-21364: Generated Code Contains Local Information Disclosure Vulnerability

- Priority: **Routine**
- Reason: Not severe (CVSS 5.3, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2021-03-11 · Modified: 2024-08-03
- Aliases: GHSA-hpv8-9rq5-hq7w
- Record: https://cvemate.com/vulnerability/CVE-2021-21364 · JSON: https://cvemate.com/vulnerability/CVE-2021-21364/json

## Description

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

## Signals

- CVSS: 5.5 medium (v3.1, NVD) CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
- EPSS: 0.286%, percentile 22.618%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- io.swagger swagger-codegen (Maven): \< 2.4.19
- smartbear swagger-codegen: \< 2.4.19
- swagger-api swagger-codegen: \< 2.4.19

## References

- <https://github.com/swagger-api/swagger-codegen/security/advisories/GHSA-hpv8-9rq5-hq7w>
- <https://github.com/swagger-api/swagger-codegen/commit/35adbd552d5f99b3ff1e0e59da228becc85190f2>
- <https://nvd.nist.gov/vuln/detail/CVE-2021-21364>

---

Data as of 2026-12-05T08:40:51.337Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
