A Leader in the 2026 Gartner® Magic Quadrant™ for Endpoint Protection. Six years running.Six years. Gartner® Magic Quadrant™ Leader.Find Out Why
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-8656

CVE-2026-8656: jsondiffpatch XSS Vulnerability

CVE-2026-8656 is a cross-site scripting flaw in jsondiffpatch before version 0.7.6 that allows attackers to inject malicious HTML through unsanitized JSON values. This article covers technical details, impact, and mitigation.

Published: May 21, 2026

CVE-2026-8656 Overview

CVE-2026-8656 is a Cross-site Scripting (XSS) vulnerability affecting the jsondiffpatch JavaScript package in versions before 0.7.6. The flaw resides in the annotated formatter, which fails to properly sanitize JSON values and property names before rendering them in the Document Object Model (DOM). Applications that compare untrusted JSON or object data and render the annotated formatter output expose users to attacker-controlled HTML execution. The weakness is classified under CWE-79.

Critical Impact

Attacker-controlled HTML embedded in JSON keys or values is interpreted by the browser, enabling script execution in the context of the hosting application.

Affected Products

  • jsondiffpatch npm package versions prior to 0.7.6
  • Web applications that render annotated formatter output from untrusted JSON inputs
  • Downstream libraries and tooling that embed the jsondiffpatch annotated formatter

Discovery Timeline

  • 2026-05-16 - CVE-2026-8656 published to the National Vulnerability Database (NVD)
  • 2026-05-19 - Last updated in NVD database

Technical Details for CVE-2026-8656

Vulnerability Analysis

The jsondiffpatch library provides utilities for computing and visualizing differences between JSON documents. The annotated formatter generates an HTML representation of a diff so developers can inspect changes in the browser. The vulnerability stems from the formatter concatenating JSON property names and values directly into HTML output without escaping HTML metacharacters.

When an application feeds untrusted input through the formatter and inserts the result into the DOM, the browser parses any embedded <script>, <img>, or event-handler markup as HTML rather than text. The result is a stored or reflected XSS condition, depending on how the host application transports the JSON. Exploitation requires user interaction, since the malicious markup only executes once the rendered diff is displayed.

According to the Snyk advisory and the upstream fix in commit 232338b34c4653148ca2f44e897a765b72c8c98f, the maintainer addressed the issue in version 0.7.6 by escaping output rendered by the annotated formatter. The EPSS probability for in-the-wild exploitation is 0.029%.

Root Cause

The annotated formatter performs string interpolation of JSON keys and values into HTML fragments without HTML entity encoding. Special characters such as <, >, ", and ' retain their syntactic meaning when inserted into the DOM, allowing attacker-supplied markup to break out of the intended text context.

Attack Vector

An attacker submits crafted JSON containing HTML or JavaScript payloads in object keys or string values. When the receiving application invokes the annotated formatter and inserts the resulting HTML into the page, the browser executes the injected payload. Typical scenarios include diff viewers for user-submitted documents, configuration auditing tools, and collaborative editors. Reference proof-of-concept payloads are documented in the GitHub Gist PoC.

Detection Methods for CVE-2026-8656

Indicators of Compromise

  • Unexpected <script> tags, onerror attributes, or javascript: URIs appearing in stored JSON documents that flow through diff views.
  • Browser console errors or Content Security Policy (CSP) violations originating from pages rendering diff output.
  • Outbound network requests from user browsers to attacker-controlled hosts immediately after viewing diff pages.

Detection Strategies

  • Inventory dependencies with npm ls jsondiffpatch or equivalent Software Composition Analysis (SCA) tooling to identify versions earlier than 0.7.6.
  • Review application code for calls to the annotated formatter (format from jsondiffpatch/formatters/annotated) handling untrusted input.
  • Inspect web server and Web Application Firewall (WAF) logs for JSON request bodies containing HTML tags or event handler attributes.

Monitoring Recommendations

  • Enable and monitor CSP violation reports to catch inline script execution attempts in diff-rendering pages.
  • Alert on anomalous DOM mutations or script injections via Real User Monitoring (RUM) or browser telemetry.
  • Track outbound requests from authenticated user sessions to unrecognized domains following diff-page activity.

How to Mitigate CVE-2026-8656

Immediate Actions Required

  • Upgrade jsondiffpatch to version 0.7.6 or later across all applications and build pipelines.
  • Audit web views that render diff output and confirm they consume the patched library.
  • Apply or tighten Content Security Policy headers to block inline script execution as a defense-in-depth control.

Patch Information

The fix is committed upstream at GitHub Commit 232338b and released in jsondiffpatch@0.7.6. Additional remediation guidance is available in the Snyk Vulnerability Report.

Workarounds

  • Avoid passing untrusted JSON directly to the annotated formatter, or sanitize keys and values with an HTML-escaping function before rendering.
  • Render diff output inside a sandboxed iframe with a strict CSP that disallows inline scripts and external resources.
  • Replace the annotated formatter with a text-only or JSON-tree formatter that does not emit raw HTML for untrusted comparisons.
bash
# Configuration example
npm install jsondiffpatch@^0.7.6
npm audit --production

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeXSS

  • Vendor/TechJsondiffpatch

  • SeverityLOW

  • CVSS Score2.0

  • EPSS Probability0.03%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:L/VA:N/SC:L/SI:L/SA:N/E:P/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
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityLow
  • AvailabilityNone
  • CWE References
  • CWE-79
  • Technical References
  • GitHub Gist PoC

  • GitHub Commit Change

  • Snyk Vulnerability Report
  • Related CVEs
  • CVE-2026-8657: jsondiffpatch Prototype Pollution Flaw
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English