Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLTg2N3EtNzdjYy05OG12

Creation of Temporary File in Directory with Insecure Permissions in the OpenAPI Generator Maven plugin

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:

Permalink: https://github.com/advisories/GHSA-867q-77cc-98mv
JSON: https://advisories.ecosyste.ms/api/v1/advisories/MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLTg2N3EtNzdjYy05OG12
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Moderate
Classification: General
Published: about 3 years ago
Updated: over 1 year ago


CVSS Score: 4.0
CVSS vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

Identifiers: GHSA-867q-77cc-98mv, CVE-2021-21429
References: Repository: https://github.com/OpenAPITools/openapi-generator
Blast Radius: 9.0

Affected Packages

maven:org.openapitools:openapi-generator-maven-plugin
Dependent packages: 12
Dependent repositories: 180
Downloads:
Affected Version Ranges: < 5.1.0
Fixed in: 5.1.0
All affected versions: 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.1.0, 3.1.1, 3.1.2, 3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.3.0, 3.3.1, 3.3.2, 3.3.3, 3.3.4, 4.0.0, 4.0.1, 4.0.2, 4.0.3, 4.1.0, 4.1.1, 4.1.2, 4.1.3, 4.2.0, 4.2.1, 4.2.2, 4.2.3, 4.3.0, 4.3.1, 5.0.0, 5.0.1
All unaffected versions: 5.1.0, 5.1.1, 5.2.0, 5.2.1, 5.3.0, 5.3.1, 5.4.0, 6.0.0, 6.0.1, 6.1.0, 6.2.0, 6.2.1, 6.3.0, 6.4.0, 6.5.0, 6.6.0, 7.0.0, 7.0.1, 7.1.0, 7.2.0, 7.3.0, 7.4.0, 7.5.0