CVE-2022-30241 Cross-site Scripting in jquery.json-viewer
Attackers can execute arbitrary scripts via unescaped JSON input in the jquery.json-viewer library, potentially compromising user sessions.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2022-30241?
CVE-2022-30241 is a medium-severity cross-site scripting vulnerability in n/a, published on 4 May 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
The jquery.json-viewer library through 1.4.0 for Node.js does not properly escape characters such as < in a JSON object, as demonstrated by a SCRIPT element.
Weakness: CWE-79
Which versions are affected by CVE-2022-30241?
2 open source packages ship an affected version, including jquery.json-viewer. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
jquery.json-viewer npm | All versions | 1.5.0 |
jquery.json-viewer npm | All versions | 1.5.0 |
Products include Jquery Json-Viewer Project Jquery Json-Viewer.
How do I fix CVE-2022-30241?
Upgrade jquery.json-viewer to 1.5.0 or later.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2022-30241 being exploited?
There is no known exploitation of CVE-2022-30241 in the wild and no public exploit code.
Sources
Also known as GHSA-qp2q-6h9j-jg2r.