Security mailing lists by PureSourceCode

CVE-2021-21430

MEDIUM 5.5CVSS 3.1

Creation of Temporary File in Directory with Insecure Permissions in auto-generated Java, Scala code

OpenAPI Generator allows generation of API client libraries (SDK generation), 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. Auto-generated code (Java, Scala) that deals with uploading or downloading binary data through API endpoints will create insecure temporary files during the process. Affected generators: java (jersey2, okhttp-gson (default library)), scala-finch. The issue has been patched with Files.createTempFile and released in the v5.1.0 stable version.

Published
10 May 2021
Last modified
8 Jul 2026
Assigned by
security-advisories@github.com
NVD status
Modified
Weakness
CWE-269CWE-377CWE-378CWE-379CWE-668
Also known as
GHSA-cqxr-xf2w-943w
Sources
NVDJSONOSV GHSA-cqxr-xf2w-943wJSON

Scores

SourceScored byVersionScoreVector / decision
NVD security-advisories@github.com (Secondary) CVSS 3.1 MEDIUM 6.2 CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
OSV GitHub CVSS 3.1 MEDIUM 6.2 CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
NVD nvd@nist.gov (Primary) CVSS 3.1 MEDIUM 5.5 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
NVD nvd@nist.gov (Primary) CVSS 2.0 LOW 2.1 AV:L/AC:L/Au:N/C:P/I:N/A:N

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
NVD openapi-generator openapi_generator
cpe:2.3:a:openapi-generator:openapi_generator:*:*:*:*:*:*:*:*
< 5.1.1 5.1.1
OSV Maven org.openapitools:openapi-generator < 5.1.0 5.1.0

References

History

  • 25 Nov 2026 20:33 UTC · NVD: first stored (published 10 May 2021)
  • 25 Nov 2026 20:13 UTC · OSV: first stored (published 11 May 2021)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.