4.0medium
Creation of Temporary File in Directory with Insecure Permissions in the OpenAPI Generator Maven plugin
- Severity
- 4.0medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.30% (higher than 23% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-867q-77cc-98mv
Description
OpenAPI Generator allows generation of API client libraries, server stubs, documentation and configuration automatically given an OpenAPI Spec. Using `File.createTempFile` in JDK will result in creating and using insecure temporary files that can leave application and system data vulnerable to attacks. OpenAPI Generator maven plug-in creates insecure temporary files during the process. The issue has been patched with `Files.createTempFile` and released in the v5.1.0 stable version.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| OpenAPITools openapi-generator | < 5.1.0 | CVE List |
| org.openapitools:openapi-generator-maven-plugin (Maven) | before 5.1.0 | GitHub Advisory Database |
| openapi-generator openapi_generator | before 5.1.0 | NVD |
All scores
| GitHub_M | 4.0medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
| GitHub | 4.0medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
| NVD | 3.3low CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N |
| NVD | 2.1low CVSS:2.0 | AV:L/AC:L/Au:N/C:P/I:N/A:N |
Classification
What each source says
CVE List
OpenAPI Generator allows generation of API client libraries, server stubs, documentation and configuration automatically given an OpenAPI Spec. Using `File.createTempFile` in JDK will result in creating and using insecure temporary files that can leave application and system data vulnerable to attacks. OpenAPI Generator maven plug-in creates insecure temporary files during the process. The issue has been patched with `Files.createTempFile` and released in the v5.1.0 stable version.
GitHub Advisory Database
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 security@openapitools.org
NVD (es)
OpenAPI Generator permite la generación de bibliotecas cliente API, stubs de servidor, documentación y configuración de forma automática dada una especificación OpenAPI. El uso de la función "File.createTempFile" en JDK dará como resultado la creación y el uso de archivos temporales no seguros que pueden dejar la aplicación y los datos del sistema vulnerables a ataques. El plugin Maven de OpenAPI Generator crea archivos temporales no seguros durante el proceso. El problema ha sido parcheado con "Files.createTempFile" y es lanzado en versión estable v5.1.0
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-21429 changed 2024-08-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-867q-77cc-98mv changed 2026-07-08 | CC-BY-4.0 |
| NVD | CVE-2021-21429 changed 2026-06-17 | Public domain |