Vulnerabilities in pkg:pypi/readthedocs-sphinx-search
PACKAGEGHSA-xgfm-fjx6-62mj is a MODERATE (CVSS 6.3) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Readthedocs sphinx search libraries in the PyPI ecosystem. The issue involves readthedocs-sphinx-search vulnerable to cross-site scripting when including search results from malicious projects. Remediation is available by upgrading affected packages to version 0.3.2.
pkg:pypi/readthedocs-sphinx-search
Vulnerability advisories affecting package pkg:pypi/readthedocs-sphinx-search. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-xgfm-fjx6-62mj | - | MODERATE | readthedocs-sphinx-search vulnerable to cross-site scripting when including search results from malicious projects |
GHSA-xgfm-fjx6-62mj at a Glance
Security Impact
CVSS: 6.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:L/A:N).
How to Fix GHSA-xgfm-fjx6-62mj
To remediate this vulnerability, upgrade all affected Readthedocs sphinx search dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install readthedocs-sphinx-search>=0.3.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show readthedocs-sphinx-search
How to Check if You Are Affected
To determine whether your Python environment is affected by GHSA-xgfm-fjx6-62mj, inspect your installed packages using pip:
pip show readthedocs-sphinx-search
Analyze the terminal output to locate any version of Readthedocs sphinx search in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.3.2), your application is affected.
Note: The pip show readthedocs-sphinx-search command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Readthedocs sphinx search, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-xgfm-fjx6-62mj Affected Readthedocs sphinx search Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
readthedocs-sphinx-search
|
PyPI |
< 0.3.2
|
0.3.2
|
References
Frequently Asked Questions
What is GHSA-xgfm-fjx6-62mj?
Which Readthedocs sphinx search versions are affected?
What version fixes GHSA-xgfm-fjx6-62mj?
Is readthedocs-sphinx-search affected?
What is the CVSS score of GHSA-xgfm-fjx6-62mj?
What CWE is associated with GHSA-xgfm-fjx6-62mj?
How can I check PyPI dependencies for GHSA-xgfm-fjx6-62mj?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-xgfm-fjx6-62mj",
"modified" : "2024-01-16T20:48:16Z",
"published" : "2024-01-16T20:48:16Z",
"aliases" : [ ],
"summary" : "readthedocs-sphinx-search vulnerable to cross-site scripting when including search results from malicious projects",
"details" : "### Impact\n\nThis 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](https://github.com/readthedocs/readthedocs.org/security/advisories/GHSA-qhqx-5j25-rv48).\n\nUsers of this extension should update to the 0.3.2 version, and trigger a new build.\n\nThis issue was discovered by a member of our team, and we have seen no signs that this vulnerability was exploited in the wild.\n\n### Patches\n\nThis issue has been patched in our 0.3.2 version. \n\n### References\n\n- https://github.com/readthedocs/readthedocs-sphinx-search/commit/8c6f6d01e88e72ef32ed0c220b6c19d1e1121c73\n\n### For more information\n\nIf you have any questions or comments about this advisory, email us at [security@readthedocs.org](mailto:security@readthedocs.org) ([PGP](https://docs.readthedocs.io/page/security.html#pgp-key))",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "readthedocs-sphinx-search"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.3.2"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.3.1"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/readthedocs/readthedocs-sphinx-search/security/advisories/GHSA-xgfm-fjx6-62mj"
}, {
"type" : "WEB",
"url" : "https://github.com/readthedocs/readthedocs-sphinx-search/commit/8c6f6d01e88e72ef32ed0c220b6c19d1e1121c73"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/readthedocs/readthedocs-sphinx-search"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-01-16T20:48:16Z",
"nvd_published_at" : null
}
}