CVE Catalog

CVE-2025-9910

MediumCVSS 4.7
Published: Updated: Translated: NVD NIST

Exploitation Probability (EPSS)

Low risk
0.30%

22th percentile - higher than 22% of all known CVEs

Summary

jsondiffpatch packages before 0.7.2 are vulnerable to Cross-site Scripting (XSS) via HtmlFormatter::nodeBegin. An attacker can inject malicious scripts into HTML payloads that may lead to code execution if untrusted payloads are used as the diff source and the result is rendered with the built-in HTML formatter on a private website.

Risk Assessment

If an application renders diffs from untrusted sources using the built-in HTML formatter, an attacker can execute arbitrary code in the user's browser. This can lead to session or data theft.

Recommendation

Update jsondiffpatch to version 0.7.2 or later. Avoid rendering untrusted data through HtmlFormatter or apply additional output sanitization.

Other vulnerabilities in jsondiffpatch

See all
Original NVD description (English source)

Versions of the package jsondiffpatch before 0.7.2 are vulnerable to Cross-site Scripting (XSS) via HtmlFormatter::nodeBegin. An attacker can inject malicious scripts into HTML payloads that may lead to code execution if untrusted payloads were used as source for the diff, and the result renderer using the built-in html formatter on a private website.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS