Cross-Site Scripting in jquery.json-viewer
Summary
GHSA-v9wp-8r97-v6xg: Cross-Site Scripting in jquery.json-viewer. Affects jquery.json-viewer versions < 1.3.0. Fixed in 1.3.0. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
jquery.json-viewer is an npm package that provides a JSON viewer plugin for jQuery. It allows users to display JSON data in a structured and user-friendly manner. However, versions prior to 1.3.0 are vulnerable to Cross-Site Scripting (XSS) attacks.
Vulnerability Detail
The vulnerability in jquery.json-viewer arises from insufficient sanitization of user input when creating links. The package concatenates user input in an <a> tag without proper validation, enabling attackers to inject malicious links with JSON payloads. For example, an attacker could create a link with a JSON payload that includes JavaScript code, leading to arbitrary code execution in a victim's browser.
How To Fix
Latest published version: 1.5.0 as of 22 Oct 2026
npm install jquery.json-viewer@1.5.0
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
1.3.0
This is the first release that contains the fix.
npm install jquery.json-viewer@1.3.0
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Conclusion
In conclusion, versions of jquery.json-viewer prior to 1.3.0 are vulnerable to Cross-Site Scripting (XSS) attacks. To mitigate this vulnerability, it is crucial to upgrade to version 1.3.0 or later. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for jquery.json-viewer →
FAQ
The vulnerability allows attackers to execute arbitrary JavaScript code in a victim's browser, potentially leading to various malicious activities such as stealing sensitive information or performing unauthorized actions on behalf of the victim.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability. Vulert analyzes your package-lock.json file and provides real-time alerts for open-source vulnerabilities.
No, there are no known workarounds for this vulnerability. It is recommended to upgrade to the fixed version of jquery.json-viewer.
There is no specific evidence of this vulnerability being exploited in the wild. However, XSS vulnerabilities are commonly targeted by attackers, so it is important to address this issue promptly.
You can find more information about this vulnerability, including technical details and the fixed version, in the advisory published by the GitHub Security Advisory Database: [link to advisory]
References
Related vulnerabilities
Recent vulnerabilities recorded for jquery.json-viewer.