Redocly redocly-cli
Redocly CLI: Arbitrary code execution via Arazzo `$faker` expression using `respect`
Redocly CLI makes OpenAPI validation, linting, and documentation workflows easier. Prior to version 2.33.0 of @redocly/respect-core and @redocly/cli, the respect command dynamically evaluates $faker runtime expressions in Arazzo descriptions. A crafted expression can traverse constructor, prototype, or __proto__ properties in packages/respect-core/src/modules/context-parser/get-value-from-context.ts, reach the JavaScript Function constructor, and execute arbitrary code when a user processes an untrusted description. The executed code runs with the privileges of the CLI process and can execute shell commands or read CI secrets. Users processing only trusted, self-authored workflows are not affected. This issue is fixed in @redocly/respect-core and @redocly/cli version 2.33.0.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 1.34.17
- >= 2.0.0, < 2.33.0
Fixed in 1.34.17, 2.33.0
Mitigation
Upgrade redocly-cli to 1.34.17 or 2.33.0 or later.
References
- Vendor advisory github.com/Redocly/redocly-cli/security/adviso…
- Patch github.com/Redocly/redocly-cli/pull/2881
- Patch github.com/Redocly/redocly-cli/pull/2922
3 more
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.