WaratekVRT Sign in

CVE-2021-21364 swagger-codegen

Affected softwareswagger-codegen
Severity5.5 Medium CVSS 3.1 3 scores
Fixed in2.4.19
WeaknessIncorrect permission assignment (CWE-732)
Published11 Mar 2021
Updated17 Jun 2026

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

CWE-200 · Information exposureCWE-378

Exploitation status

No public exploit

No exploit has been reported in the sources we check. Published 5 years ago.

  • CISA KEV not listed
  • VulnCheck KEV not listed
  • CISA Vulnrichment no assessment published
  • Indexed PoC none indexed
  • EPSS 0.28% chance in 30 days

Waratek protection

No exploit published

Within Waratek scope. In the sources we check, nobody has published exploit code for this CVE or reported it being exploited.

A public code fix exists: swagger-api/swagger-codegen 35adbd5.

  • Protection none
  • Action unverified
  • Review automated Upstream data
  • Record active
Decided by Medium or Low severity, no CISA or VulnCheck KEV listing, no PoC clearing the evidence bar, no CISA verdict, no Oracle advisory
Finding This CVE is MEDIUM severity, is not listed in CISA KEV or VulnCheck KEV, has no public exploit or PoC in any indexed source, carries no CISA Vulnrichment finding of a demonstrated exploit, and is not part of an Oracle Critical Patch Update. None of the signals that would put it in front of an engineer is present, and the volume of CVEs below that bar is too great to take one at a time, so no rule is written for it. This is a decision about what we act on, not a finding that the CVE is harmless — a patch may well be derivable, and a low-severity defect can still be one link in a longer chain.
Candidate fix https://github.com/swagger-api/swagger-codegen/commit/35adbd552d5f99b3ff1e0e59da228becc85190f2 : a commit: the change itself

CVSS

5.5 MEDIUM v3.1 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N 3 metrics

We show the highest score from the newest CVSS version. Scores from different versions can't be compared, and the first score listed is sometimes a 0.0 placeholder.

VersionScoreBandVectorAssignerType
CVSS 3.1 5.5 MEDIUM CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N NVD Primary published
CVSS 3.1 5.3 MEDIUM CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:H/I:N/A:N security-advisories@github.com Secondary
CVSS 2.0 2.1 none AV:L/AC:L/Au:N/C:P/I:N/A:N NVD Primary

Affected software and releases

Maven packages

Affected and fixed versions, from OSV.dev
PackageIntroducedFixedLast affected
io.swagger:swagger-codegen 0 2.4.19 unbounded

Products and versions

2 products, 2 version entries
SourceVendorProductSchemeAffected versions
osv io.swagger swagger-codegen generic < 2.4.19
nvd smartbear swagger-codegen generic < 2.4.19

References

URLTags
https://github.com/swagger-api/swagger-codegen/commit/35adbd552d5f99b3ff1e0e59da228becc85190f2 commit
https://github.com/swagger-api/swagger-codegen/security/advisories/GHSA-hpv8-9rq5-hq7w WEB

Timeline

Published2021-03-11By the CVE Program.
NVD record modified2026-06-17NVD's own last-modified date for this record.