CVE-2025-9910: Jsondiffpatch :nodeBegin Vulnerability
MODERATECVE-2025-9910 is a MODERATE (CVSS 4.7) :nodebegin vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Jsondiffpatch libraries in the npm ecosystem. The issue involves :nodebegin. Remediation is available by upgrading affected packages to version 0.7.2.
CVE-2025-9910 at a Glance
Security Impact
CVSS: 4.7
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N).
How to Fix CVE-2025-9910
To remediate this vulnerability, upgrade all affected Jsondiffpatch dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install jsondiffpatch@0.7.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls jsondiffpatch
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2025-9910, inspect your project dependencies using npm:
npm ls jsondiffpatch
Analyze the terminal output to locate any version of Jsondiffpatch in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.7.2), your application is affected.
Note: The npm ls jsondiffpatch command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Jsondiffpatch, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-9910 Affected Jsondiffpatch Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
jsondiffpatch
|
npm |
< 0.7.2
|
0.7.2
|
References
Frequently Asked Questions
What is CVE-2025-9910?
Which Jsondiffpatch versions are affected?
What version fixes CVE-2025-9910?
Is jsondiffpatch affected?
What is the CVSS score of CVE-2025-9910?
What CWE is associated with CVE-2025-9910?
How can I check npm dependencies for CVE-2025-9910?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-33vc-wfww-vjfv",
"modified" : "2025-09-22T22:45:32Z",
"published" : "2025-09-11T06:30:23Z",
"aliases" : [ "CVE-2025-9910" ],
"summary" : "jsondiffpatch is vulnerable to Cross-site Scripting (XSS) via HtmlFormatter::nodeBegin",
"details" : "### Vulnerability in jsondiffpatch\n\nVersions of `jsondiffpatch` prior to `0.7.2` are vulnerable to Cross-site Scripting (XSS) in the `HtmlFormatter` (`HtmlFormatter::nodeBegin`). When diffs are rendered to HTML using the built-in formatter, untrusted payloads can inject scripts and execute in the context of a consuming web page.\n\n**Affected versions:** >= 0, < 0.7.2\n**Patched version:** 0.7.2\n\n**Remediation**\nUpgrade to `jsondiffpatch` `0.7.2` or later. The fix hardens the HTML formatter to avoid script injection.\n\n**Workarounds**\nAvoid using the HTML formatter on untrusted diffs, or sanitize/escape the rendered output.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "jsondiffpatch"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.7.2"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-9910"
}, {
"type" : "WEB",
"url" : "https://github.com/benjamine/jsondiffpatch/issues/383"
}, {
"type" : "WEB",
"url" : "https://github.com/benjamine/jsondiffpatch/commit/0e374b5dd8d7879b329a9fc18affbd46ad50dd14"
}, {
"type" : "WEB",
"url" : "https://benjamine.github.io/jsondiffpatch/index.html"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/benjamine/jsondiffpatch"
}, {
"type" : "WEB",
"url" : "https://security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSBOWER-12549277"
}, {
"type" : "WEB",
"url" : "https://security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-12549276"
}, {
"type" : "WEB",
"url" : "https://security.snyk.io/vuln/SNYK-JS-JSONDIFFPATCH-10369031"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-09-12T21:12:49Z",
"nvd_published_at" : "2025-09-11T05:15:34Z"
}
}