Live threats

All CVEs / Smartbear

CVE-2021-21363Smartbear Swagger-codegen

High 7.0

Priority
42
CVSS 3.1
7.0
EPSS
0.4%
probability of exploitation in 30 days · percentile 38
Auth required
Yes
Published
Mar 11, 2021
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-378, CWE-379
Vector
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Swagger-codegen.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
Maven io.swagger:swagger-codegen < 2.4.19 2.4.19 —

Per OSV / GitHub Advisories (GHSA-pc22-3g76-gm6j). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
smartbearswagger-codegen< 2.4.19

Official sources

References

Links published by the sources. Open them with care.