{"answers":{"affected":"4 open source packages ship an affected version, including @orval/mock. It affects 1 product.","exploited":"There is no known exploitation of CVE-2026-24132 in the wild and no public exploit code.","fix":"Upgrade @orval/mock to a fixed version for your release line: 7.20.0 or 8.0.3.","what":"CVE-2026-24132 is a high-severity code injection vulnerability in orval-labs orval, published on 22 Jan 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2026-24132 and fix it if it is affected.\n\nWhat it is: CVE-2026-24132 is a high-severity code injection vulnerability in orval-labs orval, published on 22 Jan 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2026-24132 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- @orval/mock (npm): affected all versions; fixed in 7.20.0\n- @orval/mock (npm): affected all versions; fixed in 7.20.0\n- @orval/mock (npm): affected from 8.0.0-rc.0; fixed in 8.0.3\n- @orval/mock (npm): affected from 8.0.0-rc.0; fixed in 8.0.3\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-24132/ (Markdown: https://insights.sbomify.com/CVE-2026-24132/index.md)","id":"CVE-2026-24132","markdown":"https://insights.sbomify.com/CVE-2026-24132/index.md","name":"CVE-2026-24132","record":{"aliases":["GHSA-f456-rf33-4626"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"OpenAPI client generator","requires_auth":"none","summary":"Attackers can inject arbitrary code into generated mock files via malicious OpenAPI specifications, potentially leading to code execution during development.","user_interaction":"required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"orval","vendor":"orval"}],"cvss":{"score":7.7,"severity":"high","source":"cna","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","version":"4.0"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"},{"id":"CWE-77","name":"Improper Neutralization of Special Elements used in a Command"}],"description":"Orval generates type-safe JS clients (TypeScript) from any valid OpenAPI v3 or Swagger v2 specification. Versions \n7.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.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Orval Mock Generation Code Injection via const","id":"CVE-2026-24132","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"code_injection","year":"2026"},"n_packages":4,"n_references":9,"next":{"headline":"jsPDF Affected by Denial of Service (DoS) via Unvalidated BMP Dimensions in BMPDecoder","id":"CVE-2026-24133"},"packages":[{"ecosystem":"npm","fixed":["7.20.0"],"introduced":["0"],"last_affected":[],"package":"@orval/mock","purl":null,"source":"GHSA-f456-rf33-4626"},{"ecosystem":"npm","fixed":["7.20.0"],"introduced":["0"],"last_affected":[],"package":"@orval/mock","purl":"pkg:npm/%40orval/mock","source":"GHSA-f456-rf33-4626"},{"ecosystem":"npm","fixed":["8.0.3"],"introduced":["8.0.0-rc.0"],"last_affected":[],"package":"@orval/mock","purl":null,"source":"GHSA-f456-rf33-4626"},{"ecosystem":"npm","fixed":["8.0.3"],"introduced":["8.0.0-rc.0"],"last_affected":[],"package":"@orval/mock","purl":"pkg:npm/%40orval/mock","source":"GHSA-f456-rf33-4626"}],"prev":{"headline":"pnpm has Path Traversal via arbitrary file permission modification","id":"CVE-2026-24131"},"products":["orval"],"published":"2026-01-22","related":[{"cvss_score":9.3,"headline":"Orval has a code injection via unsanitized x-enum-descriptions uing JS comments","id":"CVE-2026-25141","kev_date_added":null,"published":"2026-01-30"},{"cvss_score":9.3,"headline":"Orval MCP client is vulnerable to code injection via unsanitized x-enum-descriptions in enum generation","id":"CVE-2026-23947","kev_date_added":null,"published":"2026-01-20"},{"cvss_score":9.3,"headline":"orval MCP client is vulnerable to a code injection attack.","id":"CVE-2026-22785","kev_date_added":null,"published":"2026-01-12"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-01-23","vendors":["orval-labs"]},"summary":"Attackers can inject arbitrary code into generated mock files via malicious OpenAPI specifications, potentially leading to code execution during development.","url":"https://insights.sbomify.com/CVE-2026-24132/"}