GHSA-867q-77cc-98mv

Suggest an improvement
Source
https://github.com/advisories/GHSA-867q-77cc-98mv
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/04/GHSA-867q-77cc-98mv/GHSA-867q-77cc-98mv.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-867q-77cc-98mv
Aliases
Published
2021-04-29T21:51:37Z
Modified
2023-11-08T04:04:45.834692Z
Severity
  • 4.0 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N CVSS Calculator
Summary
Creation of Temporary File in Directory with Insecure Permissions in the OpenAPI Generator Maven plugin
Details

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

Database specific
{
    "nvd_published_at": "2021-04-27T20:15:00Z",
    "github_reviewed_at": "2021-04-27T19:58:51Z",
    "severity": "MODERATE",
    "github_reviewed": true,
    "cwe_ids": [
        "CWE-377",
        "CWE-378",
        "CWE-379",
        "CWE-552"
    ]
}
References

Affected packages

Maven / org.openapitools:openapi-generator-maven-plugin

Package

Name
org.openapitools:openapi-generator-maven-plugin
View open source insights on deps.dev
Purl
pkg:maven/org.openapitools/openapi-generator-maven-plugin

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.1.0

Affected versions

3.*

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.*

4.0.0-beta
4.0.0-beta2
4.0.0-beta3
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.*

5.0.0-beta
5.0.0-beta2
5.0.0-beta3
5.0.0
5.0.1