readthedocs-sphinx-search vulnerable to cross-site scripting when including search results from malicious projectsGHSA-xgfm-fjx6-62mj
MEDIUMFix: readthedocs/readthedocs-sphinx-search@8c6f6d0GHSA-xgfm-fjx6-62mj is a medium-severity (CVSS 6.3) vulnerability in readthedocs-sphinx-search. A fix is available for readthedocs-sphinx-search — see the affected versions and patch details below.
Real-World Exposure
readthedocs-sphinx-searchReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
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)
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | readthedocs-sphinx-search | all versions | 0.3.2pip install --upgrade 'readthedocs-sphinx-search==0.3.2' |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for readthedocs-sphinx-search, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update readthedocs-sphinx-search to 0.3.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-xgfm-fjx6-62mj is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Frequently Asked Questions
Is GHSA-xgfm-fjx6-62mj in your dependencies?
Find it across PyPI, including transitive dependencies.