CVE-2021-21363
Generator Web Application: Local Privilege Escalation Vulnerability via System Temp Directory
Severity Score
Exploit Likelihood
Affected Versions
Public Exploits
1Exploited 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'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.
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 mediante el análisis de su definición de OpenAPI/Swagger. En swagger-codegen versiones anteriores a 2.4.19, en sistemas similares a Unix, el directorio temporal del sistema se comparte entre todos los usuarios de ese sistema. Un usuario ubicado puede observar el proceso de creación de un subdirectorio temporal en el directorio temporal compartido y una corrida para completar la creación del subdirectorio temporal. Esta vulnerabilidad es una escalada de privilegios local porque un atacante puede agregar el contenido de "outputFolder". Como tal, el código escrito en este directorio, cuando se ejecuta, puede ser controlado por el atacante. Para mayor detalles, consulte el GitHub Security Advisory al que se hace referencia. Esta vulnerabilidad es corregido en versión 2.4.19
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
- 2024-08-03 First Exploit
- ---------- Exploited in Wild
- ---------- KEV Due Date
CWE
- CWE-378: Creation of Temporary File With Insecure Permissions
- CWE-379: Creation of Temporary File in Directory with Insecure Permissions
CAPEC
References (2)
URL | Tag | Source |
---|
URL | Date | SRC |
---|---|---|
https://github.com/swagger-api/swagger-codegen/security/advisories/GHSA-pc22-3g76-gm6j | 2024-08-03 |
URL | Date | SRC |
---|---|---|
https://github.com/swagger-api/swagger-codegen/commit/987ea7a30b463cc239580d6ad166c707ae942a89 | 2021-03-18 |
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
|