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:
- Open an issue in OpenAPI Generator Github repo
- Email us at security@openapitools.org
Betroffene Software
Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.
| Plattform | Paket | Anfällige Versionen | Behoben in |
|---|---|---|---|
| Java / Kotlin (Maven) | org.openapitools:openapi-generator-maven-plugin | < 5.1.0 | 5.1.0 |
Verweise
- https://github.com/OpenAPITools/openapi-generator/security/advisories/GHSA-867q-77cc-98mv
- https://nvd.nist.gov/vuln/detail/CVE-2021-21429
- https://github.com/OpenAPITools/openapi-generator/pull/8795
- https://github.com/OpenAPITools/openapi-generator/blob/06ad7a51eff04393203cfa715e54e1fb59d984fe/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java#L782-L799
- CVSS-Vektor
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N- Schwäche (CWE)
CWE-377, CWE-378, CWE-379, CWE-552- Plattform
- Java / Kotlin (Maven)
- Paket
org.openapitools:openapi-generator-maven-plugin- Veröffentlicht
- 29.04.2021
- Aktualisiert
- 11.10.2026 12:22
Quellen und Lizenzen
OSV / GitHub Advisory Database - GHSA-867q-77cc-98mv - CC BY 4.0
Schwachstellenhistorie: org.openapitools:openapi-generator-maven-plugin
Alle veröffentlichten Schwachstellen dieses Pakets (Java / Kotlin (Maven)), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.
Dies ist die einzige bekannte Schwachstelle dieses Pakets.
Erkennen Sie Schwachstellen in Ihrer Anwendung
Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.