CVE-2022-25303 Cross-site Scripting (XSS)

Medium 5.4 Published Updated

Attacker can execute arbitrary JavaScript in victim's browser via unescaped query parameter in Whoogle Search error messages.

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-25303?

CVE-2022-25303 is a medium-severity cross-site scripting vulnerability in whoogle-search, published on 12 Jul 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 package whoogle-search before 0.7.2 are vulnerable to Cross-site Scripting (XSS) via the query string parameter q. In the case where it does not contain the http string, it is used to build the error_message that is then rendered in the error.html template, using the [flask.render_template](https://flask.palletsprojects.com/en/2.1.x/api/flask.render_template) function. However, the error_message is rendered using the [| safe filter](https://jinja.palletsprojects.com/en/3.1.x/templates/working-with-automatic-escaping), meaning the user input is not escaped.

Weakness: CWE-79

Which versions are affected by CVE-2022-25303?

3 open source packages ship an affected version, including whoogle-search. It affects 1 product.

PackageAffectedFixed in
whoogle-search PyPIAll versions0.7.2
whoogle-search PyPIAll versions0.7.2
whoogle-search PyPIAll versions0.7.2

Products include Whoogle-Search Project Whoogle-Search.

How do I fix CVE-2022-25303?

Upgrade whoogle-search to 0.7.2 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-25303 being exploited?

There is no known exploitation of CVE-2022-25303 in the wild and no public exploit code.

Sources

Also known as GHSA-mxvc-fwgx-j778, PYSEC-2022-226, SNYK-PYTHON-WHOOGLESEARCH-2803306.

Is CVE-2022-25303 in your software?

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

Check your SBOMs for free