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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.7
- **CVSS:** 7.7 (v4.0, CNA) `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`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Attack requirements: Present; Privileges required: None; User interaction: Passive; Confidentiality impact: High; Integrity impact: High; Availability impact: High; Confidentiality impact on other systems: None; Integrity impact on other systems: None; Availability impact on other systems: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 1.11% (percentile 66, 2026-11-28)
- **CWE:** CWE-77
- **Aliases:** GHSA-f456-rf33-4626
- **Published:** 2026-01-22T18:09:13.000Z
- **Modified:** 2026-06-17T10:22:40.997Z

## Who should check

- Projects that depend on npm package @orval/mock (\< 7.20.0)
- Anyone running orval-labs orval \< 7.20.0; \>= 8.0.0-rc.0, \< 8.0.3

## Description

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.

## Affected and fixed versions

- npm `@orval/mock`: affected \< 7.20.0; fixed 7.20.0, 8.0.3 (osv)
- orval-labs orval: \< 7.20.0; \>= 8.0.0-rc.0, \< 8.0.3 (cvelist)

## Mitigation

- Upgrade @orval/mock to one of 7.20.0, 8.0.3 (or later in the same release line).

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-24132. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-24132.md
Affected: @orval/mock < 7.20.0
Fixed in: 7.20.0, 8.0.3

Steps:
1. Search this machine and project for @orval/mock (npm), orval-labs orval: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-24132 being exploited?

There is no confirmed exploitation: CVE-2026-24132 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.11% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2026-24132?

High: CVSS 7.7 (v4.0, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work.

### Which versions are affected by CVE-2026-24132?

@orval/mock \< 7.20.0.

### Is there a fix for CVE-2026-24132?

Yes. Fixed in 7.20.0, 8.0.3. Upgrade @orval/mock to one of 7.20.0, 8.0.3 (or later in the same release line).

### How do I check if I'm affected by CVE-2026-24132?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/orval-labs/orval/security/advisories/GHSA-f456-rf33-4626>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2026-24132>
- patch: <https://github.com/orval-labs/orval/pull/2828>
- patch: <https://github.com/orval-labs/orval/pull/2829>
- patch: <https://github.com/orval-labs/orval/pull/2830>
- patch: <https://github.com/orval-labs/orval/commit/44ca8c1f5f930a3e4cefb6b79b38bcde7f8532a5>
- patch: <https://github.com/orval-labs/orval/commit/6d8ece07ccb80693ad43edabccb3957aceadcd06>
- patch: <https://github.com/orval-labs/orval/commit/9b211cddc9f009f8a671e4ac5c6cb72cd8646b62>
- other: <https://github.com/orval-labs/orval/releases/tag/v7.20.0>
- other: <https://github.com/orval-labs/orval/releases/tag/v8.0.3>
- other: <https://github.com/orval-labs/orval>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-24132>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-f456-rf33-4626> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2026-24132> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-24132>
