CVE-2022-30241 Cross-site Scripting in jquery.json-viewer

Medium 6.1 Published Updated

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.

PackageAffectedFixed in
jquery.json-viewer npmAll versions1.5.0
jquery.json-viewer npmAll versions1.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.

Is CVE-2022-30241 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free