Vulnerability Details : CVE-2021-21364
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.
Vulnerability category: Information leak
Products affected by CVE-2021-21364
- cpe:2.3:a:smartbear:swagger-codegen:*:*:*:*:*:*:*:*
Exploit prediction scoring system (EPSS) score for CVE-2021-21364
0.05%
Probability of exploitation activity in the next 30 days
EPSS Score History
~ 12 %
Percentile, the proportion of vulnerabilities that are scored at or less
CVSS scores for CVE-2021-21364
Base Score | Base Severity | CVSS Vector | Exploitability Score | Impact Score | Score Source | First Seen |
---|---|---|---|---|---|---|
2.1
|
LOW | AV:L/AC:L/Au:N/C:P/I:N/A:N |
3.9
|
2.9
|
NIST | |
5.5
|
MEDIUM | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N |
1.8
|
3.6
|
NIST | |
5.3
|
MEDIUM | CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:H/I:N/A:N |
0.8
|
4.0
|
GitHub, Inc. |
CWE ids for CVE-2021-21364
-
The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.Assigned by: security-advisories@github.com (Secondary)
-
Opening temporary files without appropriate measures or controls can leave the file, its contents and any function that it impacts vulnerable to attack.Assigned by: security-advisories@github.com (Secondary)
-
The product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors.Assigned by:
- nvd@nist.gov (Primary)
- security-advisories@github.com (Secondary)
References for CVE-2021-21364
-
https://github.com/swagger-api/swagger-codegen/commit/35adbd552d5f99b3ff1e0e59da228becc85190f2
Merge pull request from GHSA-hpv8-9rq5-hq7w · swagger-api/swagger-codegen@35adbd5 · GitHubPatch;Third Party Advisory
-
https://github.com/swagger-api/swagger-codegen/security/advisories/GHSA-hpv8-9rq5-hq7w
Generated Code Contains Local Information Disclosure Vulnerability · Advisory · swagger-api/swagger-codegen · GitHubMitigation;Third Party Advisory
Jump to