CVE-2026-63225
JSON

4.4medium

Redocly CLI: Path traversal when using `split` command

Severity
4.4medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.17% (higher than 6% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-657c-g7qc-r9j2

Description

Redocly CLI makes OpenAPI validation, linting, and documentation workflows easier. Prior to @redocly/cli 2.33.2, the split command constructs output paths under --outDir from untrusted OpenAPI or AsyncAPI component names and x-codeSamples lang values without verifying that the resolved target remains inside the selected directory. A description containing literal ../ traversal segments in those fields can cause the split command to place or overwrite files outside --outDir. Component data remains constrained to YAML or JSON, and code-sample filenames remain based on the HTTP method, so this is not an unrestricted arbitrary-content file write. This issue is fixed in @redocly/cli version 2.33.2.

Affected

Product or packageVersionsReported by
Redocly redocly-cli< 1.34.17, >= 2.0.0, < 2.33.2CVE List
@redocly/cli (npm)before 1.34.17, from 2.0.0 before 2.33.2GitHub Advisory Database

All scores

GitHub_M4.4medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L
GitHub4.4medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L

Classification

CWE-22CWE-73

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

Redocly CLI makes OpenAPI validation, linting, and documentation workflows easier. Prior to @redocly/cli 2.33.2, the split command constructs output paths under --outDir from untrusted OpenAPI or AsyncAPI component names and x-codeSamples lang values without verifying that the resolved target remains inside the selected directory. A description containing literal ../ traversal segments in those fields can cause the split command to place or overwrite files outside --outDir. Component data remains constrained to YAML or JSON, and code-sample filenames remain based on the HTTP method, so this is not an unrestricted arbitrary-content file write. This issue is fixed in @redocly/cli version 2.33.2.

GitHub Advisory Database
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.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-63225 changed 2026-09-17CVE Terms of Use
GitHub Advisory DatabaseGHSA-657c-g7qc-r9j2 changed 2026-09-17CC-BY-4.0
NVDCVE-2026-63225 changed 2026-09-30Public domain