# CVE-2026-96757: orval code generation improper escaping in Content-Type headers

Source: https://junglewise.ai/threats/cve-2026-96757-orval-before-8-29-0-fails-to-escape-openapi-media-type-keys-when  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-23. Updated: 2026-09-26  
License: CC BY 4.0 with a link back

CVE-2026-96757 · Severity: critical · CVSS 9.8 · Published 2026-09-23

orval is a code generator that creates TypeScript API clients from OpenAPI specifications. Before version 8.29.0, it fails to properly escape media-type keys from the OpenAPI spec when generating Content-Type header strings, allowing attackers to inject arbitrary JavaScript code into the generated client code through a malicious OpenAPI file. When developers run the generated API client or mock resolvers, the injected code executes in their application.

Technologies: [Orval Labs Orval](https://junglewise.ai/threats/technologies/orval-labs-orval). Vendors: [Orval Labs](https://junglewise.ai/threats/vendors/orval-labs).

## Quick answers

**Is CVE-2026-96757 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-96757 being exploited in the wild.

**How severe is CVE-2026-96757?** Critical severity, with a CVSS score of 9.8, published 23 September 2026.

**Which products and versions are affected?** Orval Labs Orval before 8.29.0.

**Is there a fix for CVE-2026-96757?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2026-96757 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-96757?** Check whether you run Orval Labs Orval at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

The vulnerability is a code injection flaw in orval's code generation logic. When emitting OpenAPI media-type keys into single-quoted string literals for Content-Type headers, the generator does not escape special characters, allowing an attacker to break out of the string and inject arbitrary JavaScript via crafted media-type keys in a malicious OpenAPI specification. This affects generated fetch operations and mock resolvers; the attack requires the attacker to control the OpenAPI specification file processed by orval.

## Affected products

- orval-labs orval before 8.29.0

## Timeline

- 2026-09-23: disclosed

## References

- [https://github.com/orval-labs/orval](https://github.com/orval-labs/orval)
- [https://github.com/orval-labs/orval/blob/v8.28.1/packages/fetch/src/index.ts](https://github.com/orval-labs/orval/blob/v8.28.1/packages/fetch/src/index.ts)

## Related threats

- [orval code generation injection via unescaped operationId](https://junglewise.ai/threats/cve-2026-96759-orval-before-8-29-0-fails-to-escape-the-operationid-parameter)
- [orval code injection in factory generator date handling](https://junglewise.ai/threats/cve-2026-96756-orval-versions-before-8-30-0-contain-a-code-injection)
- [orval Hono generator code injection in OpenAPI path handling](https://junglewise.ai/threats/cve-2026-96754-orval-versions-before-8-29-0-contain-a-code-injection)
