Intel

AIKIDO-2026-839931

orval is vulnerable to Code Injection

Code InjectionGHSA-mxvj-m96h-8mf7 Published 2 days ago

86

High Risk

This Affects:

JSorval
6.13.0 - 8.28.1
Fixed in 8.29.0
Are you affected? Scan for Free

TL;DR

Orval embeds untrusted OpenAPI values directly into generated TypeScript across the zod, effect, and hono generators, including numeric constraints emitted as bare expressions, default values converted into backtick templates, and raw path segments placed in single-quoted method chains. A crafted specification can break out of these contexts and inject arbitrary JavaScript that runs at module import time. This yields build-time code execution wherever the generated schemas or handlers are imported. The fix validates numeric constraints and escapes strings and defaults before interpolation.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you generate zod, effect, or hono output from an untrusted or externally influenced OpenAPI document.

Background info

orval is vulnerable to Code Injection in versions 6.13.0 - 8.28.1.

How to fix this

Upgrade the orval library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform