Intel

AIKIDO-2026-939997

orval is vulnerable to Code Injection

Code InjectionGHSA-4q3x-rqfw-3x8p Published 2 days ago

93

Critical Risk

This Affects:

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

TL;DR

Orval interpolates OpenAPI media-type keys and encoding contentType values into single-quoted JavaScript string literals without sanitization across several generators. A media-type key containing a single quote closes the literal and injects arbitrary object-literal expressions into the generated client and mock code. The injected code executes when the generated HTTP client or mock handlers are invoked, and malicious specs still pass the default parser validation. The fix escapes all spec-controlled strings at each sink and adds grammar validation.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you generate client or mock code from an untrusted or externally influenced OpenAPI document.

Background info

orval is vulnerable to Code Injection in versions 6.7.1 - 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