7

CVE-2021-21363: Generator Web Application: Local Privilege Escalation Vulnerability via System Temp Directory

Modified
AliasesGHSA-pc22-3g76-gm6j
Published 11-03-2021Last modified 03-08-2024

Vulnerability summary

CVE-2021-21363 is a high (CVSS 7.0) vulnerability in smartbear swagger-codegen. EPSS estimates a 0.42% chance of exploitation in the next 30 days, higher than 38.2% of scored vulnerabilities. 1 public exploit is recorded.

Priority
Routine

Not severe (CVSS 5.3, local access); no exploitation reported by the 5 checked sources

Source freshness unavailable

How is this decided?
CVSS score
7.0/10
010
High · v3.1 (NVD)
EPSS score
0.42%
0%100%
Low · +0.01 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits1github

Timeline

  1. 11-03-2021
    PublishedVulnerability first disclosed.
  2. 03-08-2024
    Last modifiedVulnerability information updated.

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.

CVSS metrics

4 scores · 3 sources · 2 versions

EPSS trend

Probability

0.42%

Chance of exploitation in the next 30 days

Percentile

38%

Versus all other CVEs

30-day change

Increase +0.01 pp

From 0.41% on 04-11-2026

04-11-202604-12-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

1 found
  • githubUnverified

    Swagger Codegen

    Maturity: poc

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: local access, low-privilege account, user interaction (CVSS vector). Other conditions: not stated in public data.

Io.swagger1 product
  • swagger-codegen< 2.4.19
Smartbear1 product
Swagger-api1 product

3 vendors · 3 products

References

3 links