{"id":"CVE-2026-122234","kind":"vulnerability","aliases":["CVE-2026-122234"],"related":[],"title":"jsondiffpatch: unescaped array-move index lets attackers inject script","description":"jsondiffpatch before 0.7.7 contains a cross-site scripting vulnerability that allows attackers to inject markup by supplying an unescaped array-move destination index in a delta. Attackers who control a delta passed to formatters.html.format() or formatters.annotated.format() can embed script that executes in the application's origin when output is rendered.","summary":"jsondiffpatch before 0.7.7 fails to escape an array-move destination index when rendering a delta as HTML. An attacker who controls the delta can run script in the origin of the application that renders it.","severity":"medium","cvss":4.7,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["javascript","npm","package","web-frontend"],"not_affected_if":["internal-data-only","no-html-formatter"],"how_to_check":"- Check the installed version with `npm ls jsondiffpatch` and compare it to `0.7.7`.\n- Search the codebase for calls to `formatters.html.format()` or `formatters.annotated.format()`.\n- Confirm whether any delta passed to those formatters comes from user input.","fix":"- Move `jsondiffpatch` to `0.7.7` or later, per the advisory.","status":"open","published_at":"2026-11-04T21:18:10+00:00","first_seen_at":"2026-11-04T21:49:21+00:00","triaged_at":"2026-11-04T21:51:28+00:00","updated_at":"2026-11-04T21:51:28+00:00","category":"package","confidence":0.6,"triage":{"at":"2026-11-04T21:51:28Z","model":"claude-haiku-5-5","output":{"fix":"- Move `jsondiffpatch` to `0.7.7` or later, per the advisory.","reach":"internet","title":"jsondiffpatch: unescaped array-move index lets attackers inject script","impact":"medium","summary":"jsondiffpatch before 0.7.7 fails to escape an array-move destination index when rendering a delta as HTML. An attacker who controls the delta can run script in the origin of the application that renders it.","audience":"developers","category":"package","nicknames":[],"who_cares":["javascript","npm","web-frontend"],"confidence":0.6,"fix_status":"available","needs_auth":"unknown","worst_case":"script runs in the application's origin when output renders","analyst_note":"","how_to_check":"- Check the installed version with `npm ls jsondiffpatch` and compare it to `0.7.7`.\n- Search the codebase for calls to `formatters.html.format()` or `formatters.annotated.format()`.\n- Confirm whether any delta passed to those formatters comes from user input.","plain_action":"","needs_analyst":false,"not_affected_if":["no-html-formatter","internal-data-only"],"who_is_affected":"Applications that use the jsondiffpatch HTML or annotated formatters on deltas that users can influence are exposed to script injection in their own origin. Apps that only diff data internally, or never render the output as HTML, are not exposed. The sources do not say whether the flaw reaches any other formatter.","user_interaction":"unknown","needs_special_setup":"yes","severity_if_unknown":"medium"},"cost_usd":0.000688,"input_tokens":4197,"output_tokens":536,"severity_before":"medium"},"analyst_status":null,"analyst_note":null,"search":"'-122234':13A,16A '-2026':12A,15A '0.7.7':25B,60C 'allow':69C 'applic':55B,103C 'array':4A,31B,79C 'array-mov':3A,30B,78C 'attack':8A,42B,70C,86C 'contain':61C 'control':44B,88C 'cross':64C 'cross-sit':63C 'cve':11A,14A 'delta':38B,46B,85C,90C 'destin':33B,81C 'emb':97C 'escap':28B 'execut':100C 'fail':26B 'formatters.annotated.format':95C 'formatters.html.format':93C 'frontend':22B 'html':40B 'index':6A,34B,82C 'inject':9A,72C 'javascript':17B 'jsondiffpatch':1A,23B,58C 'let':7A 'markup':73C 'move':5A,32B,80C 'npm':18B 'origin':52B,105C 'output':107C 'packag':19B 'pass':91C 'render':36B,57B,109C 'run':48B 'script':10A,49B,66C,98C 'site':65C 'suppli':75C 'unescap':2A,77C 'vulner':67C 'web':21B 'web-frontend':20B","nicknames":[],"mitigations":[],"who_affected":"Applications that use the jsondiffpatch HTML or annotated formatters on deltas that users can influence are exposed to script injection in their own origin. Apps that only diff data internally, or never render the output as HTML, are not exposed. The sources do not say whether the flaw reaches any other formatter.","tier":"C","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"developers","plain_action":null,"pkeys":[],"ptokens":[],"labels":["javascript","medium","npm","package","webfrontend"],"campaign_type":null,"first_public_at":"2026-11-01T12:38:38+00:00","kev":null,"cvss_vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","cvss_by":"disclosure@vulncheck.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-122234","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-122234","severity":null,"published_at":"2026-11-04T21:18:10+00:00","modified_at":"2026-11-04T21:18:10+00:00","first_seen_at":"2026-11-04T21:49:21+00:00","fetched_at":"2026-11-04T21:49:21+00:00","note":null}],"documents":[{"id":70699,"url":"https://github.com/benjamine/jsondiffpatch/commit/c6b2d97b34bc2356c816d8dd0f8b1c8af16bb6af","title":"Patch: github.com","kind":"other","source":"nvd","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":70701,"url":"https://github.com/benjamine/jsondiffpatch/security/advisories/GHSA-jhmf-rq89-q58p","title":"Vendor advisory: github.com","kind":"vendor","source":"nvd","publisher":"vendor","text":null,"published_at":"2026-11-01T12:38:38+00:00","relation":"advisory","confidence":null,"note":"Vendor advisory: github.com"},{"id":70702,"url":"https://www.vulncheck.com/advisories/jsondiffpatch-before-0.7.7-xss-via-array-move-destination-in-html-formatters","title":"Third-party advisory: www.vulncheck.com","kind":"advisory","source":"nvd","publisher":"research","text":null,"published_at":null,"relation":"advisory","confidence":null,"note":"Third-party advisory: www.vulncheck.com"}],"exploit_sources":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}