GHSA-657c-g7qc-r9j2

Suggest an improvement
Source
https://github.com/advisories/GHSA-657c-g7qc-r9j2
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-657c-g7qc-r9j2/GHSA-657c-g7qc-r9j2.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-657c-g7qc-r9j2
Aliases
Published
2026-09-17T14:58:50Z
Modified
2026-09-17T16:32:22Z
Severity
  • 4.4 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L CVSS Calculator
Summary
Redocly CLI: Path traversal when using `split` command
Details

Impact

An OpenAPI or AsyncAPI description could make the split command write files outside the chosen output directory, on the machine of anyone who runs split against it. The write is constrained rather than a free file-write primitive: component data is emitted only as YAML/JSON, and code-sample files are named after the HTTP method, so an attacker can place or overwrite files at an unintended path but has limited control over their name and contents.

Patches

Fixed in @redocly/cli v2.33.2.

Workarounds

Do not run the split command on API descriptions from untrusted or unreviewed sources.

To detect an exploit attempt, inspect the description's component names and x-codeSamples lang values for a literal ../ — neither legitimately contains path segments.

Database specific
{
    "cwe_ids": [
        "CWE-22",
        "CWE-73"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-09-17T14:58:50Z",
    "nvd_published_at": "2026-09-16T19:17:24Z",
    "severity": "MODERATE"
}
References

Affected packages

npm / @redocly/cli

Package

Name
@redocly/cli
View open source insights on deps.dev
Purl
pkg:npm/%40redocly/cli

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
1.34.17

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-657c-g7qc-r9j2/GHSA-657c-g7qc-r9j2.json"

npm / @redocly/cli

Package

Name
@redocly/cli
View open source insights on deps.dev
Purl
pkg:npm/%40redocly/cli

Affected ranges

Type
SEMVER
Events
Introduced
2.0.0
Fixed
2.33.2

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-657c-g7qc-r9j2/GHSA-657c-g7qc-r9j2.json"