GHSA-xgfm-fjx6-62mj readthedocs-sphinx-search vulnerable to cross-site scripting when including search results from malicious projects
An attacker can inject arbitrary HTML into search results via malicious projects, requiring user interaction to trigger execution.
- 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 GHSA-xgfm-fjx6-62mj?
GHSA-xgfm-fjx6-62mj is a cross-site scripting vulnerability in readthedocs-sphinx-search, published on 16 Jan 2024. 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
Impact
This vulnerability could have allowed an attacker to include arbitrary HTML content in search results by having a user search a malicious project. This was due to our search client not correctly escaping all user content from search results. You can find more information in the advisory published in our readthedocs.org repo.
Users of this extension should update to the 0.3.2 version, and trigger a new build.
This issue was discovered by a member of our team, and we have seen no signs that this vulnerability was exploited in the wild.
Patches
This issue has been patched in our 0.3.2 version.
References
For more information
If you have any questions or comments about this advisory, email us at [email protected] (PGP)
Which versions are affected by GHSA-xgfm-fjx6-62mj?
2 open source packages ship an affected version, including readthedocs-sphinx-search.
| Package | Affected | Fixed in |
|---|---|---|
readthedocs-sphinx-search PyPI | All versions | 0.3.2 |
readthedocs-sphinx-search PyPI | All versions | 0.3.2 |
How do I fix GHSA-xgfm-fjx6-62mj?
Upgrade readthedocs-sphinx-search to 0.3.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 GHSA-xgfm-fjx6-62mj being exploited?
There is no known exploitation of GHSA-xgfm-fjx6-62mj in the wild and no public exploit code.