WaratekVRT Sign in

CVE-2021-21363 swagger-codegen

Affected softwareswagger-codegen
Severity7.0 High CVSS 3.1 3 scores
Fixed in2.4.19
WeaknessCWE-378
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'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.

CWE-379

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.41% 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 987ea7a.

  • Protection none
  • Action unverified
  • Review automated Upstream data
  • Record active
Decided by Exploit code for this candidate, published in a reviewed catalogue or a GitHub repository with 5 or more stars, or in use per CISA or VulnCheck; not only a CISA verdict, a forecast, or nothing at all
Finding This CVE is not listed in CISA KEV or VulnCheck KEV, CISA Vulnrichment records no active exploitation, no reviewed exploit catalogue carries an entry for it, and no GitHub PoC repository for it has 5 or more stars. Nobody has published exploit code worth tracing, so it is not a candidate for a rule ahead of the ones where somebody has; an upstream fix path does exist, so the remediation half of the candidacy still holds. This is a statement about what has been published, not about whether the defect is reachable or serious.
Candidate fix https://github.com/swagger-api/swagger-codegen/commit/987ea7a30b463cc239580d6ad166c707ae942a89 : a commit: the change itself

CVSS

7.0 HIGH v3.1 CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H 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 7.0 HIGH CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H NVD Primary published
CVSS 3.1 5.3 MEDIUM CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:N/I:H/A:N security-advisories@github.com Secondary
CVSS 2.0 4.4 none AV:L/AC:M/Au:N/C:P/I:P/A:P 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/987ea7a30b463cc239580d6ad166c707ae942a89 commit
https://github.com/swagger-api/swagger-codegen/security/advisories/GHSA-pc22-3g76-gm6j WEB

Timeline

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