CVE-2026-23947
criticalpriority · attend · 49EPSS 0.008 · 57 %ileexploit · PoCEUUSEPSS · scored 2026-10-27
Orval generates type-safe JS clients (TypeScript) from any valid OpenAPI v3 or Swagger v2 specification. Versions prior to 7.19.0 until 8.0.2 are vulnerable to arbitrary code execution in environments consuming generated clients. This issue is similar in nature to CVE-2026-22785, but affects a different code path in @orval/core that was not addressed by CVE-2026-22785's fix. The vulnerability allows untrusted OpenAPI specifications to inject arbitrary TypeScript/JavaScript code into generated clients via the x-enumDescriptions field, which is embedded without proper escaping in getEnumImplementation(). I have confirmed that the injection occurs during const enum generation and results in executable code within the generated schema files. Orval 7.19.0 and 8.0.2 contain a fix for the issue.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · high–critical · 8.9–9.8
ssvc
A stakeholder decision — act, attend, or track — from exploitation and impact.
weaknesses
The CWE weakness classes this flaw belongs to.
exploits (1)
Public proof-of-concept and weaponised exploit code.
affected products (6)
Products and version ranges known to be affected.
advisories (1)
Vendor and ecosystem advisories describing this.
- GHSA-h526-wf6g-67jvOrval has a code injection via unsanitized x-enum-descriptions in enum generation2026-01-21ghsa · osvUS
### Impact Arbitrary code execution in environments consuming generated clients This issue is similar in nature to the recently-patched MCP vulnerability (CVE-2026-22785), but affects a different code path in @orval/core that was not addressed by that fix. The vulnerability allows untrusted OpenAPI specifications to inject arbitrary TypeScript/JavaScript code into generated clients via the x-enumDescriptions field, which is embedded without proper escaping in getEnumImplementation(). I have confirmed that the injection occurs during const enum generation and results in executable code within the generated schema files. ### Patches Upgrade to Orval 8.0.2 ### References An example OpenAPI showing the issue: ```yaml openapi: 3.0.4 info: title: Enum PoC version: "1.0.0" paths: /ping: get: operationId: ping responses: "200": description: ok content: application/json: schema: $ref: "#/components/schemas/EvilEnum" components: schemas: EvilEnum: type: string enum: - PWNED x-enumDescriptions: - "pwned */ require('child_process').execSync('id'); /*" ```
also known as (3)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (8)
External citations — patches, advisories, analysis.
- https://access.redhat.com/security/cve/cve-2026-23947cnnvd
- https://github.com/orval-labs/orval/releasesPatchcnnvd
- https://github.com/orval-labs/orval/releases/tag/v8.0.2cnnvd
- https://github.com/orval-labs/orval/security/advisories/GHSA-h526-wf6g-67jvcnnvd
- https://github.com/orval-labs/orval/releases/tag/v8.0.2enisa_euvd
- https://github.com/orval-labs/orval/security/advisories/GHSA-h526-wf6g-67jvenisa_euvd
- https://github.com/orval-labs/orval/releases/tag/v8.0.2ProductRelease Notesnvd
- https://github.com/orval-labs/orval/security/advisories/GHSA-h526-wf6g-67jvVendor Advisorynvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan