{"id":"GHSA-33vc-wfww-vjfv","revision":"1098f4f6d997446491998ddfa754b91c","records":[{"revision":"1098f4f6d997446491998ddfa754b91c","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-33vc-wfww-vjfv","aliases":["CVE-2025-9910"],"title":"jsondiffpatch is vulnerable to Cross-site Scripting (XSS) via HtmlFormatter::nodeBegin","description":"### 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.","state":0,"publishedAt":"2025-09-11T06:30:23+00:00","modifiedAt":"2026-09-10T03:50:27.8478065+00:00","affected":[{"ecosystem":"npm","name":"jsondiffpatch","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.7.2"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N","score":null,"severity":null},{"system":"CVSS_V4","vector":"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","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://nvd.nist.gov/vuln/detail/CVE-2025-9910","https://github.com/benjamine/jsondiffpatch/issues/383","https://github.com/benjamine/jsondiffpatch/commit/0e374b5dd8d7879b329a9fc18affbd46ad50dd14","https://benjamine.github.io/jsondiffpatch/index.html","https://github.com/benjamine/jsondiffpatch","https://security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSBOWER-12549277","https://security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-12549276","https://security.snyk.io/vuln/SNYK-JS-JSONDIFFPATCH-10369031"],"sourceUrl":"https://github.com/advisories/GHSA-33vc-wfww-vjfv","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-33vc-wfww-vjfv","identifiers":["GHSA-33vc-wfww-vjfv","CVE-2025-9910"]},"retained":false,"historicalAffected":[]}],"coverage":[]}