CVE-2021-21364
Generated Code Contains Local Information Disclosure Vulnerability
Severity Score
Exploit Likelihood
Affected Versions
Public Exploits
0Exploited in Wild
-Decision
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
CVSS Scores
SSVC
- Decision:-
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
References (2)
URL | Tag | Source |
---|---|---|
https://github.com/swagger-api/swagger-codegen/security/advisories/GHSA-hpv8-9rq5-hq7w | Mitigation |
URL | Date | SRC |
---|
URL | Date | SRC |
---|---|---|
https://github.com/swagger-api/swagger-codegen/commit/35adbd552d5f99b3ff1e0e59da228becc85190f2 | 2022-10-21 |
URL | Date | SRC |
---|
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
|