Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft delta with malicious array-move index
-
ExploitSubmit untrusted delta to app using HTML/annotated formatter
-
ExecutionUnescaped destination value rendered as live markup
-
ImpactInjected script executes in application origin
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitable only when the affected application (running jsondiffpatch <= 0.7.6) passes an attacker-controlled delta into formatters.html.format() or formatters.annotated.format() AND renders the returned HTML in a browser context. The injection point is specifically the array-move destination index in an array delta (e.g. { _t: 'a', _0: ['x', '<payload>', 3] }), which is emitted unescaped. Limiting factors: applications that only use the core diff/patch API or non-HTML output are not affected; the delta must originate from untrusted input; and the formatter output must actually be inserted into the DOM as HTML. No authentication is required of the attacker (PR:N), but a victim must render the output (UI), and the attack requirement (AT:P) is that the attacker controls a delta that reaches the vulnerable formatter. |
| Impact | Multiple decision signals agree this is a genuinely low-priority issue rather than a high-CVSS/low-real-risk mismatch. The supplied CVSS 4.0 base score is 2.3 (Low): the vector AV:N/AC:L/AT:P/PR:N/UI:P with VC:N/VI:N/VA:N and only subsequent-system SC:L/SI:L reflects a stored/reflected XSS whose impact is confined and conditional. The vuln.today Decision label is 'monitor', there is no CISA KEV listing (not actively exploited per available data), and no EPSS score was provided, so no exploitation-probability signal is available to weigh. A patch is confirmed available (fixed in 0.7.7). The advisory includes an example malicious delta, so a public PoC reference exists, but it is not verified as working, self-contained exploit code and must not be conflated with active exploitation. One caveat on the scoring model: the input CVSS 4.0 vector maps this XSS entirely to subsequent-system impact (VC/VI/VA = N, SC/SI = L), which yields a low 2.3; a CVSS 3.1 reading of the same XSS uses the scope-change convention (S:C, C:L/I:L) and would land around 6.1 (Medium). The low 4.0 score is therefore partly a scoring-model artifact, but even the higher 3.1 figure is gated by the real-world precondition that the application must feed an attacker-controlled delta into the HTML/annotated formatters and render the output - a non-default, developer-chosen code path. Net: low operational urgency, remediate on normal patching cadence. |
| Exploit ScenarioDerived | An application that displays JSON diffs (for example an audit-log viewer or collaborative editor) formats an untrusted, attacker-supplied delta with jsondiffpatch's HTML or annotated formatter and renders the result in a victim's browser. The attacker submits a delta whose array-move destination index contains markup such as '<img src=x onerror=alert(1)>', which executes in the application's origin when the victim views the diff. A public PoC reference (an example delta) exists in the advisory; it is not verified as working exploit code. The CVSS vector (AV:N/AC:L/AT:P/UI:P) reflects that the attack is network-deliverable and low-complexity but depends on an attack requirement (attacker-controlled delta reaching the formatter) and on a victim rendering the output. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 04, 2026
Cross-site scripting in jsondiffpatch 0.7.6 and earlier allows an attacker who controls a delta passed to formatters.html.format() or formatters.annotated.format() to inject markup through the array-move destination index, which both formatters emit without escaping; the payload executes in the application's origin once the returned HTML string is rendered. Only applications that feed an untrusted delta into those two HTML-producing formatters and insert the result into a DOM are exposed, while code that uses the core diff/patch API or non-HTML output is not affected. No authentication is required of the attacker, but a victim must render the formatter output; the vendor patch is 0.7.7, decision signals place this at monitor-level priority, and while no confirmed public exploit code is available the advisory does include an illustrative reproduction delta.
RemediationAI
Vendor-released patch: upgrade jsondiffpatch to 0.7.7, which HTML-escapes the array-move destination in both the html and annotated formatters (commit c6b2d97b34bc2356c816d8dd0f8b1c8af16bb6af, announced in GHSA-jhmf-rq89-q58p); the version bump from 0.7.6 to 0.7.7 is part of that commit, so plan the dependency update across any service that formats deltas for browser rendering. If upgrading is not immediately possible, the advisory's stated workaround is to avoid rendering formatter output produced from untrusted data as HTML on affected versions - insert the string via textContent or run it through an HTML sanitizer before DOM insertion - at the cost of losing the formatted diff markup and styling, and note that this must be applied at every call site of formatters.html.format() and formatters.annotated.format(), since no configuration flag or input validation in the library blocks the payload on <= 0.7.6. Because the decision label is monitor with a low CVSS 4.0 base score of 2.3, treat this as routine dependency hygiene rather than an emergency, using the advisory at https://github.com/benjamine/jsondiffpatch/security/advisories/GHSA-jhmf-rq89-q58p as the authoritative reference.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
jsondiffpatch is an npm library that computes and formats deltas between JSON objects. Array deltas are encoded with the type marker _t:'a' and numeric-ish index keys whose values are three-element move triples of the form [fromIndex, toIndex, 3]; the third element is the destination index of the move. CWE-79 applies because the HTML formatter interpolated that destination directly into <div class="jsondiffpatch-moved-destination">${delta[1]}</div> and the annotated formatter interpolated it into a <span title="(position to insert at final state)">index ${delta[1]}</span> without escaping, so markup placed in the destination position became live HTML in the consuming page. The advisory describes this as a missing fix for the array-move destination XSS previously reported in connection with GHSA-33vc-wfww-vjfv, meaning earlier hardening escaped other fields but not this one. The supplied commit c6b2d97b34bc2356c816d8dd0f8b1c8af16bb6af confirms the trigger point and the fix: both formatters now wrap delta[1] in htmlEscape(), and a regression test asserts that a delta such as { _t:'a', _0:['x','<img src=x onerror=alert(1)>',3] } no longer emits the raw payload. The affected package is identified by CPE cpe:2.3:a:benjamine:jsondiffpatch and tagged XSS/jsondiffpatch in the source intelligence.
Know when Jsondiffpatch gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Script executes in the app origin (S:C with C:L/I:L), delivered remotely with no auth (AV:N/PR:N) but requiring a victim to render attacker-controlled formatter output (UI:R); no availability impact.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
EUVD-2026-117120
GHSA-36c7-f344-vj2m
NVD
CVE.org
EPSS
Exploit-DB