Race Condition Affecting org.openapitools:openapi-generator-online package, versions [,5.1.0)


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.04% (6th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JAVA-ORGOPENAPITOOLS-1290614
  • published11 May 2021
  • disclosed11 May 2021
  • creditJonathan Leitschuh

Introduced: 11 May 2021

CVE-2021-21428  (opens in a new tab)
CWE-264  (opens in a new tab)
CWE-362  (opens in a new tab)
CWE-377  (opens in a new tab)
CWE-378  (opens in a new tab)
CWE-379  (opens in a new tab)

How to fix?

Upgrade org.openapitools:openapi-generator-online to version 5.1.0 or higher.

Overview

org.openapitools:openapi-generator-online is an a Spring Boot Server application which hosts a client/server generator API.

Affected versions of this package are vulnerable to Race Condition. The contents of the outputFolder can be appended to by an attacker. As such, code written to this directory, when executed can be attacker controlled. openapi-generator-online creates insecure temporary folders with the File.createTempFile during the code generation process. The insecure temporary folders store the auto-generated files which can be read and appended to by any users on the system. This is due to a race condition between the deletion of the randomly generated temporary file and the creation of the temporary directory.

References

CVSS Scores

version 3.1