CyberRota Analysis
AI-GeneratedOrval versions prior to 8.21.0 are vulnerable due to improper handling of single quotes in schema property names, leading to the potential execution of attacker-controlled JavaScript in generated mock factories. This critical vulnerability can result in code execution within developer, CI, test, or application environments, posing significant risks to security. Organizations using affected versions of Orval should prioritize updating to version 8.21.0 to mitigate this risk.
Public Exploit Signal
A public exploit, PoC, GitHub repository or Metasploit reference was detected for this CVE.
Note: these links are listed for security research and verification purposes only.
Original NVD Description
Orval generates type-safe JavaScript clients in TypeScript from OpenAPI v3 and Swagger v2 specifications. Prior to 8.21.0, a single quote in a schema property name is emitted into single-quoted object keys in generated MSW mock factories without safe encoding. This permits attacker-controlled JavaScript to be evaluated when the generated mock factory is called by tests or an MSW handler, resulting in code execution in the developer, CI, test, or application environment. The affected code is packages/core/src/getters/keys.ts function getKey and MSW mock generation. This issue is fixed in version 8.21.0.