SB2021030981 - Multiple vulnerabilities in swagger-codegen



SB2021030981 - Multiple vulnerabilities in swagger-codegen

Published: March 9, 2021 Updated: November 9, 2026

Security Bulletin ID SB2021030981
CSH Severity
Low
Patch available
YES
Number of vulnerabilities 2
Exploitation vector Local access
Highest impact Code execution

Breakdown by Severity

Low 100%
  • Low
  • Medium
  • High
  • Critical

Description

This security bulletin contains information about 2 vulnerabilities.


1) Creation of temporary file in directory with insecure permissions (CVE-ID: CVE-2021-21363)

CWE-ID: CWE-379 - Creation of Temporary File in Directory with Insecure Permissions

CVSSv4: 8.5 [CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]


The vulnerability allows an unprivileged local attacker to escalate privileges through generated code that is later executed by a higher-privileged user.

The vulnerability exists due to a race condition when the swagger-codegen Generator web application replaces a temporary file with an output directory in the shared system temporary directory on Unix-like systems. An unprivileged local attacker can win this race to own the output directory and modify generated code before its execution.


2) Incorrect permission assignment for critical resource (CVE-ID: CVE-2021-21364)

CWE-ID: CWE-732 - Incorrect Permission Assignment for Critical Resource

CVSSv4: 6.8 [CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N]


The vulnerability allows a local user to gain access to potentially sensitive information.

The vulnerability exists due to the system temporary directory is shared between all local users. A local user can gain unauthorized access to sensitive information on the system.


Remediation

Install update from vendor's website.