CVE-2021-21429
JSON

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 packageVersionsReported by
OpenAPITools openapi-generator< 5.1.0CVE List
org.openapitools:openapi-generator-maven-plugin (Maven)before 5.1.0GitHub Advisory Database
openapi-generator openapi_generatorbefore 5.1.0NVD

All scores

GitHub_M4.0medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
GitHub4.0medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
NVD3.3low CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
NVD2.1low CVSS:2.0AV: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:

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.&#xa0;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.&#xa0;El plugin Maven de OpenAPI Generator crea archivos temporales no seguros durante el proceso.&#xa0;El problema ha sido parcheado con "Files.createTempFile" y es lanzado en versión estable v5.1.0

References

Sources

SourceRecordLicence
CVE ListCVE-2021-21429 changed 2024-08-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-867q-77cc-98mv changed 2026-07-08CC-BY-4.0
NVDCVE-2021-21429 changed 2026-06-17Public domain