// For flags

CVE-2021-21364

Generated Code Contains Local Information Disclosure Vulnerability

Severity Score

5.5
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

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.

swagger-codegen es un proyecto de código abierto que contiene un motor basado en plantillas para generar documentación, clientes API y stubs de servidor en diferentes idiomas al analizar su definición de OpenAPI/Swagger. En swagger-codegen versiones anteriores a 2.4.19, en sistemas tipo Unix, el directorio temporal del sistema es compartido entre todos los usuarios locales. Cuando son creados files/directories, las configuraciones predeterminadas de "umask" para el proceso son respetadas. Como resultado, por defecto, la mayoría de los procesos /apis crearán files/directories con los permisos "-rw-r - r -" y "drwxr-xr-x" respectivamente, a menos que una API que ajusta explícitamente permisos de archivos seguros sea usada. Debido a que esta vulnerabilidad impacta el código generado, el código generado seguirá siendo vulnerable hasta que sea corregido manualmente. Esta vulnerabilidad es corregida en versión 2.4.19. Tome en cuenta que esta es una vulnerabilidad diferente de CVE-2021-21363

*Credits: N/A
CVSS Scores
Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None
Attack Vector
Local
Attack Complexity
High
Privileges Required
Low
User Interaction
Required
Scope
Changed
Confidentiality
High
Integrity
None
Availability
None
Attack Vector
Local
Attack Complexity
Low
Authentication
None
Confidentiality
Partial
Integrity
None
Availability
None
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2020-12-22 CVE Reserved
  • 2021-03-11 CVE Published
  • 2023-03-08 EPSS Updated
  • 2024-08-03 CVE Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
  • CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
  • CWE-378: Creation of Temporary File With Insecure Permissions
  • CWE-732: Incorrect Permission Assignment for Critical Resource
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Smartbear
Search vendor "Smartbear"
Swagger-codegen
Search vendor "Smartbear" for product "Swagger-codegen"
< 2.4.19
Search vendor "Smartbear" for product "Swagger-codegen" and version " < 2.4.19"
-
Affected