GitHub Advisoryadvisory · Maven
GHSA-867q-77cc-98mv Creation of Temporary File in Directory with Insecure Permissions in the OpenAPI Generator Maven plugin
MEDIUM
Official page ↗
- Aliases
- CVE-2021-21429
- Ecosystem
- Maven
- Packages
- org.openapitools:openapi-generator-maven-plugin
- Severity
- Moderate
- CVSS vector
- CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
- Weaknesses
- CWE-377, CWE-378, CWE-379, CWE-552
- Reviewed
- 2021-04-27
Affected packages
• Maven org.openapitools:openapi-generator-maven-plugin: < 5.1.0 → fixed in 5.1.0
Description
Impact
Using `File.createTempFile` in JDK will result in creating and using insecure temporary files that can leave application and system data vulnerable to attacks. This vulnerability only impacts unix-like systems where the local system temporary directory is shared between all users. This vulnerability does not impact Windows or modern versions of MacOS.
OpenAPI Generator Maven plug-in creates insecure temporary files during the code generation process. It creates insecure temporary files to store the OpenAPI specification files provided by the users and these temporary files can be read by any users in the system.
The impact of this vulnerability is information disclosure of the contents of the specification file to other local users.
Patches
The issue has been patched with `Files.createTempFile` and released in the v5.1.0 stable version.
For more information
If you have any questions or comments about this advisory:
• Open an issue in OpenAPI Generator Github repo
• Email us at [email protected]
Related
Weakness · not in database (1)
Alias · CVE (1)
- CVE-2021-21429 OpenAPI Generator allows generation of API client libraries, server stubs, documentation and configuration automatically given an OpenAPI… vulnerability
References
- https://github.com/OpenAPITools/openapi-generator/security/advisories/GHSA-867q-77cc-98mv web
- https://nvd.nist.gov/vuln/detail/CVE-2021-21429 advisory
- https://github.com/OpenAPITools/openapi-generator/pull/8795 web
- https://github.com/OpenAPITools/openapi-generator/blob/06ad7a51eff04393203cfa715e54e1fb59d984fe/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java#L782-L799 web