Privilege Escalation Affecting io.swagger:swagger-generator package, versions [,2.4.19)


Severity

Recommended
0.0
low
0
10

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

Threat Intelligence

EPSS
0.05% (18th 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-IOSWAGGER-1085062
  • published11 Mar 2021
  • disclosed11 Mar 2021
  • creditJonathan Leitschuh

Introduced: 11 Mar 2021

CVE-2021-21363  (opens in a new tab)
CWE-264  (opens in a new tab)

How to fix?

Upgrade io.swagger:swagger-generator to version 2.4.19 or higher.

Overview

Affected versions of this package are vulnerable to Privilege Escalation. The system temporary directory on unix-like systems is shared between multiple users. Information written to this directory, or directories created under this directory that do not correctly set the posix standard permissions can have these directories read/modified by other users. This is due to a race condition between the call to delete and the call to mkdirs. As such, after deletion of the directory and before the creation of a new one, an attacker could create the directory, giving them ownership of the directory and its contents.

References

CVSS Scores

version 3.1