Intel

AIKIDO-2026-456998

@orval/core is vulnerable to Type Confusion

Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Oct 28, 2026
October 28, 2026

50

CVE Score

Medium

Type Confusion

Are you affected? Scan for Free

TL;DR

Orval's pascal in packages/core/src/utils/case.ts memoizes case conversions in a plain object, pascalMemory, and returns pascalMemory[s] when that lookup is truthy. camel always calls pascal and then decap. Schema names, $ref names, and path parameter names from the OpenAPI document are passed through as that cache key. For toString, valueOf, constructor, hasOwnProperty, isPrototypeOf, toLocaleString, and propertyIsEnumerable, the lookup is the inherited Object.prototype function, so pascal returns that function instead of a string. camel then calls charAt on it and generation throws TypeError: s.charAt is not a function. A direct pascal call stringifies the function into the generated identifier. The fix stores the cache in a Map and reads it with get.

How do I fix this?

Upgrade the @orval/core package to version 8.25.0 or later.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and generate code from an OpenAPI document that uses an Object.prototype method name, such as constructor or toString, as a schema name, $ref name, or path parameter name.

Versions

6.19.0 - 8.24.0

Fixed in 8.25.0

Background info

@orval/core is vulnerable to Type Confusion in versions 6.19.0 - 8.24.0.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea