CVE-2026-24132: CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection') in orval-labs orval
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.
AI Analysis
Technical Summary
CVE-2026-24132 is a command injection vulnerability classified under CWE-77 affecting orval, a popular tool used to generate type-safe JavaScript/TypeScript clients from OpenAPI v3 or Swagger v2 specifications. The vulnerability exists in versions 7.19.0 and below, as well as 8.0.0-rc.0 through 8.0.2. The root cause is improper neutralization of special elements in the const keyword values within schema properties of OpenAPI specifications. These const values are interpolated directly into the mock scalar generator function (getMockScalar) without proper escaping or serialization, allowing an attacker to inject arbitrary TypeScript or JavaScript code into the generated mock files. This malicious code can then execute within interface definitions and faker/MSW (Mock Service Worker) handlers, potentially compromising the development environment or automated testing frameworks. The vulnerability is similar in impact to a previously reported enum x-enumDescriptions issue but affects a different code path in the faker-based mock generator rather than the core orval package. Exploitation requires supplying a crafted OpenAPI specification, which may involve user interaction to trigger generation. The CVSS 4.0 base score is 7.7 (high), reflecting network attack vector, low attack complexity, no privileges required, partial user interaction, and high impact on confidentiality, integrity, and availability. The vulnerability was publicly disclosed on January 22, 2026, and fixed in orval versions 7.20.0 and 8.0.3. No known exploits have been reported in the wild to date. This vulnerability primarily threatens software development and CI/CD environments that utilize orval to generate client code from untrusted or external OpenAPI specifications, potentially allowing malicious code injection into development artifacts and testing mocks.
Potential Impact
For European organizations, the impact of CVE-2026-24132 is significant in software development and DevOps environments that use orval for generating API clients and mocks. Successful exploitation can lead to injection of malicious code into generated TypeScript files, which may be executed during development, testing, or CI/CD processes. This can compromise the confidentiality of source code, integrity of generated clients and mocks, and availability of development pipelines. Attackers could potentially introduce backdoors, manipulate test behaviors, or exfiltrate sensitive information embedded in development environments. Organizations relying on automated client generation from third-party or untrusted OpenAPI specs are particularly vulnerable. The risk extends to cloud-native and microservices architectures prevalent in Europe, where API-driven development is common. Although no known exploits exist yet, the ease of exploitation and high impact warrant urgent attention. Failure to patch could lead to supply chain risks and undermine software integrity, affecting regulatory compliance and trust in software products.
Mitigation Recommendations
1. Upgrade orval to version 7.20.0 or later, or 8.0.3 or later, where the vulnerability is fixed. 2. Implement strict validation and sanitization of all OpenAPI specifications before processing, especially those obtained from untrusted or external sources. 3. Employ static code analysis and security scanning on generated client and mock files to detect injected malicious code early in the development cycle. 4. Restrict usage of orval to trusted internal specifications where possible, minimizing exposure to crafted malicious inputs. 5. Integrate security gates in CI/CD pipelines to verify the integrity of generated code artifacts. 6. Educate developers and DevOps teams about the risks of processing untrusted API specifications and encourage secure coding practices. 7. Monitor for updates and advisories from orval-labs and related security communities to stay informed of any emerging threats or patches. 8. Consider isolating the code generation environment to limit potential impact of malicious code execution.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Ireland
CVE-2026-24132: CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection') in orval-labs orval
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.
AI-Powered Analysis
Technical Analysis
CVE-2026-24132 is a command injection vulnerability classified under CWE-77 affecting orval, a popular tool used to generate type-safe JavaScript/TypeScript clients from OpenAPI v3 or Swagger v2 specifications. The vulnerability exists in versions 7.19.0 and below, as well as 8.0.0-rc.0 through 8.0.2. The root cause is improper neutralization of special elements in the const keyword values within schema properties of OpenAPI specifications. These const values are interpolated directly into the mock scalar generator function (getMockScalar) without proper escaping or serialization, allowing an attacker to inject arbitrary TypeScript or JavaScript code into the generated mock files. This malicious code can then execute within interface definitions and faker/MSW (Mock Service Worker) handlers, potentially compromising the development environment or automated testing frameworks. The vulnerability is similar in impact to a previously reported enum x-enumDescriptions issue but affects a different code path in the faker-based mock generator rather than the core orval package. Exploitation requires supplying a crafted OpenAPI specification, which may involve user interaction to trigger generation. The CVSS 4.0 base score is 7.7 (high), reflecting network attack vector, low attack complexity, no privileges required, partial user interaction, and high impact on confidentiality, integrity, and availability. The vulnerability was publicly disclosed on January 22, 2026, and fixed in orval versions 7.20.0 and 8.0.3. No known exploits have been reported in the wild to date. This vulnerability primarily threatens software development and CI/CD environments that utilize orval to generate client code from untrusted or external OpenAPI specifications, potentially allowing malicious code injection into development artifacts and testing mocks.
Potential Impact
For European organizations, the impact of CVE-2026-24132 is significant in software development and DevOps environments that use orval for generating API clients and mocks. Successful exploitation can lead to injection of malicious code into generated TypeScript files, which may be executed during development, testing, or CI/CD processes. This can compromise the confidentiality of source code, integrity of generated clients and mocks, and availability of development pipelines. Attackers could potentially introduce backdoors, manipulate test behaviors, or exfiltrate sensitive information embedded in development environments. Organizations relying on automated client generation from third-party or untrusted OpenAPI specs are particularly vulnerable. The risk extends to cloud-native and microservices architectures prevalent in Europe, where API-driven development is common. Although no known exploits exist yet, the ease of exploitation and high impact warrant urgent attention. Failure to patch could lead to supply chain risks and undermine software integrity, affecting regulatory compliance and trust in software products.
Mitigation Recommendations
1. Upgrade orval to version 7.20.0 or later, or 8.0.3 or later, where the vulnerability is fixed. 2. Implement strict validation and sanitization of all OpenAPI specifications before processing, especially those obtained from untrusted or external sources. 3. Employ static code analysis and security scanning on generated client and mock files to detect injected malicious code early in the development cycle. 4. Restrict usage of orval to trusted internal specifications where possible, minimizing exposure to crafted malicious inputs. 5. Integrate security gates in CI/CD pipelines to verify the integrity of generated code artifacts. 6. Educate developers and DevOps teams about the risks of processing untrusted API specifications and encourage secure coding practices. 7. Monitor for updates and advisories from orval-labs and related security communities to stay informed of any emerging threats or patches. 8. Consider isolating the code generation environment to limit potential impact of malicious code execution.
Affected Countries
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-01-21T18:38:22.474Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6973c7784623b1157c5d5f43
Added to database: 1/23/2026, 7:09:44 PM
Last enriched: 1/23/2026, 7:10:50 PM
Last updated: 1/23/2026, 8:19:08 PM
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2025-70986: n/a
HighCVE-2025-70985: n/a
CriticalCVE-2025-70983: n/a
CriticalCVE-2026-21867
UnknownCVE-2025-14947: CWE-862 Missing Authorization in plugins360 All-in-One Video Gallery
MediumActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.