LiveActive security incident?Get immediate response
CVE Record

CVE-2026-24132: Orval Mock Generation Code Injection via const

Orval generates type-safe JS clients (TypeScript) from any valid OpenAPI v3 or Swagger v2 specification. Versions 7.19.0 and below and 8.0.0-rc.0 through 8.0.2 allow untrusted OpenAPI specifications to inject arbitrary TypeScript/JavaScript into generated mock files via the const keyword on schema properties. These const values are interpolated into the mock scalar generator (getMockScalar in packages/mock/src/faker/getters/scalar.ts) without proper escaping or type-safe serialization, which results in attacker-controlled code being emitted into both interface definitions and faker/MSW handlers. The vulnerability is similar in impact to the previously reported enum x-enumDescriptions (GHSA-h526-wf6g-67jv), but it affects a different code path in the faker-based mock generator rather than @orval/core. The issue has been fixed in versions 7.20.0 and 8.0.3.

HighCVSS 7.7Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

Orval can generate mock TypeScript/JavaScript code from API specifications. In affected versions, a malicious OpenAPI or Swagger file can cause attacker-controlled code to be written into generated mock files. This matters for teams that generate mocks from specifications they do not fully trust.

Executive priority

Prioritize remediation for teams that ingest outside API specifications or run Orval in automated build environments. Internal-only, trusted specifications reduce urgency but do not remove the need to upgrade.

Technical view

CVE-2026-24132 affects orval <=7.19.0 and 8.0.0-rc.0 through 8.0.2. Unescaped schema property const values are interpolated in the faker mock scalar generator, causing arbitrary TypeScript/JavaScript emission in generated interfaces and faker/MSW handlers. The issue is fixed in 7.20.0 and 8.0.3.

Likely exposure

Exposure is most likely in developer workstations, CI jobs, or build pipelines using Orval mock generation with external, user-supplied, or partner-supplied OpenAPI v3 or Swagger v2 specifications.

Exploitation context

Sources do not report active exploitation or CISA KEV listing. Exploitation requires attacker influence over the API specification and user interaction, such as generating or consuming mock code from that specification.

Researcher notes

The vulnerability is in a different path than the earlier enum x-enumDescriptions issue: packages/mock/src/faker/getters/scalar.ts. Evidence names const handling, generated mock files, interface definitions, and faker/MSW handlers. Public sources identify fixes but do not provide evidence of exploitation in the wild.

Mitigation direction

  • Upgrade Orval 7.x deployments to 7.20.0 or later.
  • Upgrade Orval 8.x deployments to 8.0.3 or later.
  • Do not generate mocks from untrusted specifications until upgraded.
  • Review generated mock files before execution in sensitive environments.
  • Check vendor advisory for any additional project-specific guidance.

Validation and detection

  • Inventory package manifests and lockfiles for Orval versions.
  • Identify CI jobs or scripts that run Orval mock generation.
  • Determine whether specifications come from third parties or user-controlled sources.
  • Confirm upgraded builds use Orval 7.20.0 or 8.0.3 or later.
  • Review recent generated mock changes for unexpected embedded code.
Prepared
Confidence
high
Sources
7

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · medium confidence lookup

CWE-77: Command execution behavior lookup

Command injection weaknesses can lead defenders to review execution techniques and command interpreter telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2026-24132 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
High
CVSS
7.7 (4.0)
Known Exploited
No
Published

Vector: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
10Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
7.7CVSS 4.0HighCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N——Primary CVE score

Vulnerability scoring details

Base CVSS 4.0 score

7.7High
CVSS 4.0 vector shape for CVE-2026-24132Attack VectorAttack ComplexityAttack RequirementsPrivileges RequiredUser InteractionVS ConfidentialityVS IntegrityVS AvailabilitySS ConfidentialitySS IntegritySS Availability

Vector: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Attack Requirements
NonePresent
Privileges Required
NoneLowHigh
User Interaction
NonePassiveActive
VS Confidentiality
HighLowNone
VS Integrity
HighLowNone
VS Availability
HighLowNone
SS Confidentiality
HighLowNone
SS Integrity
HighLowNone
SS Availability
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
orval-labsorval< 7.20.0, >= 8.0.0-rc.0, < 8.0.3Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-77 · source CWE mapping

Improper Neutralization of Special Elements used in a Command ('Command Injection')

Improper Neutralization of Special Elements used in a Command ('Command Injection') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.