OpenAPI Generator <7.6.0 Path Traversal via outputFolder Option
CVE-2024-35219 Published on May 27, 2024
OpenAPI Generator Online - Arbitrary File Read/Delete
OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec. Prior to version 7.6.0, attackers can exploit a path traversal vulnerability to read and delete files and folders from an arbitrary, writable directory as anyone can set the output folder when submitting the request via the `outputFolder` option. The issue was fixed in version 7.6.0 by removing the usage of the `outputFolder` option. No known workarounds are available.
Vulnerability Analysis
CVE-2024-35219 can be exploited with network access, and requires small amount of user privileges. This vulnerability is considered to have a low attack complexity. Public availability of a proof of concept (POC) exploit exists for CVE-2024-35219. The potential impact of an exploit of this vulnerability is considered to have a small impact on confidentiality, a high impact on integrity and availability.
Weakness Type
What is a Directory traversal Vulnerability?
The software uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the software does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
CVE-2024-35219 has been classified to as a Directory traversal vulnerability or weakness.
Affected Versions
OpenAPITools openapi-generator:- Version < 7.6.0 is affected.
- Before 7.6.0 is affected.
Vulnerable Packages
The following package name and versions may be associated with CVE-2024-35219
| Package Manager | Vulnerable Package | Versions | Fixed In |
|---|---|---|---|
| maven | org.openapitools:openapi-generator-online | < 7.6.0 | 7.6.0 |
Exploit Probability
EPSS (Exploit Prediction Scoring System) scores estimate the probability that a vulnerability will be exploited in the wild within the next 30 days. The percentile shows you how this score compares to all other vulnerabilities.