CVE-2026-122234

jsondiffpatch before 0.7.7 XSS via Array-Move Destination in HTML Formatters

Published Nov 4, 2026 CVSS 4.0 · 2.3 Low EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

jsondiffpatch prior to version 0.7.7 contains a cross‑site scripting flaw that enables attacker‑controlled injection of script content into HTML output. The vulnerability is triggered when an unescaped array‑move destination index is present in a delta, which is then processed by formatters.html.format() or formatters.annotated.format(). The injected code is executed in the context of the application’s origin whenever the formatted output is rendered, allowing an attacker to hijack user sessions, steal cookies, or deface the user interface. The weakness is a classic reflected XSS flaw (CWE‑79).

Affected Systems

The affected vendor is Benjamini. The product is jsondiffpatch, a JavaScript library for computing differences between JSON objects. Any deployment of jsondiffpatch version earlier than 0.7.7 is susceptible, regardless of which JavaScript environment it runs in, as the flaw resides in the core formatter functions that are part of the public API.

Risk and Exploitability

The CVSS score of 2.3 indicates a low severity according to vendor criteria, and the exploit probability (EPSS) is not disclosed. Because the flaw manifests when a user controls the delta supplied to the formatter, it is best suited for scenarios where the application accepts user‑generated or third‑party deltas. An attacker who can deliver a malicious delta will be able to cause arbitrary script execution in the browser context of anyone who views the rendered output. The vulnerability is not currently listed in the CISA KEV catalog, implying no widely known or active exploitation, but the lack of a hard boundary means inadvertent exposure can occur in interactive or collaborative settings. The attack requires the victim to render the formatted delta, making it an “exploit‑through‑browser” risk with limited persistence.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade jsondiffpatch to version 0.7.7 or later, which removes the unescaped array‑move destination handling.
  • If upgrading is not possible, avoid invoking formatters.html.format() or formatters.annotated.format() on any delta that originates from user input; prefer the JSON or plain‑text formatters instead.
  • If the library must handle untrusted deltas, sanitize or escape the array‑move destination indices before passing them to the formatter, or perform strict validation of the delta structure to ensure no script content can be inserted.

Generated by OpenCVE AI on November 4, 2026 at 22:57 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Benjamine
Benjamine jsondiffpatch
Vendors & Products Benjamine
Benjamine jsondiffpatch
Type Values Removed Values Added
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.
Title jsondiffpatch before 0.7.7 XSS via Array-Move Destination in HTML Formatters
Weaknesses CWE-79
References
Metrics cvssV3_1

{'score': 4.7, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N'}

cvssV4_0

{'score': 2.3, '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'}

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Nov 9, 2026, 4:57 PM
Reserved
Nov 4, 2026, 8:51 PM
Status
Awaiting Analysis
Published
Nov 4, 2026, 9:18 PM
Modified
Nov 12, 2026, 9:30 PM