{"id":"CVE-2024-1892","aliases":["GHSA-cc65-xxvf-f7r9","PYSEC-2024-162"],"url":"https://o3.security/vulnerability/CVE-2024-1892","summary":"ReDoS Vulnerability in scrapy/scrapy's XMLFeedSpider","details":"### Impact\n\nThe following parts of the Scrapy API were found to be vulnerable to a [ReDoS attack](https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS):\n\n- The [`XMLFeedSpider`](https://docs.scrapy.org/en/latest/topics/spiders.html#scrapy.spiders.XMLFeedSpider) class or any subclass that uses the default node iterator: `iternodes`, as well as direct uses of the `scrapy.utils.iterators.xmliter` function.\n\n- **Scrapy 2.6.0 to 2.11.0**: The [`open_in_browser`](https://docs.scrapy.org/en/latest/topics/debug.html#scrapy.utils.response.open_in_browser) function for a response without a [base tag](https://www.w3schools.com/tags/tag_base.asp). \n\nHandling a malicious response could cause extreme CPU and memory usage during the parsing of its content, due to the use of vulnerable regular expressions for that parsing.\n\n### Patches\n\nUpgrade to Scrapy 2.11.1.\n\nIf you are using Scrapy 1.8 or a lower version, and upgrading to Scrapy 2.11.1 is not an option, you may upgrade to Scrapy 1.8.4 instead.\n\n### Workarounds\n\nFor `XMLFeedSpider`, switch the node iterator to ``xml`` or ``html``.\n\nFor `open_in_browser`, before using the function, either manually review the response content to discard a ReDos attack or manually define the base tag to avoid its automatic definition by `open_in_browser` later.\n\n### Acknowledgements\n\nThis security issue was reported by @nicecatch2000  [through huntr.com](https://huntr.com/bounties/271f94f2-1e05-4616-ac43-41752389e26b/).\n","published":"2024-02-28T00:00:14.092Z","modified":"2026-10-28T02:31:13.826676076Z","cvss":{"score":7.5,"severity":"HIGH","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"},"epss":{"score":0.00557,"percentile":0.45019,"asOf":"2026-09-16"},"cisaKev":null,"exploitsKnown":1,"affectedPackages":[{"ecosystem":"PyPI","name":"scrapy","fixedVersion":"2.11.1"},{"ecosystem":"PyPI","name":"scrapy","fixedVersion":"1.8.4"}],"fix":{"url":"https://github.com/scrapy/scrapy/commit/479619b340f197a8f24c5db45bc068fb8755f2c5","label":"scrapy/scrapy@479619b"},"references":[{"type":"WEB","url":"https://huntr.com/bounties/271f94f2-1e05-4616-ac43-41752389e26b"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/1xxx/CVE-2024-1892.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-1892"},{"type":"FIX","url":"https://github.com/scrapy/scrapy/commit/479619b340f197a8f24c5db45bc068fb8755f2c5"},{"type":"WEB","url":"https://github.com/scrapy/scrapy/security/advisories/GHSA-cc65-xxvf-f7r9"},{"type":"WEB","url":"https://github.com/scrapy/scrapy/commit/73e7c0ed011a0565a1584b8052ec757b54e5270b"},{"type":"WEB","url":"https://docs.scrapy.org/en/latest/news.html#scrapy-1-8-4-2024-02-14"},{"type":"WEB","url":"https://docs.scrapy.org/en/latest/news.html#scrapy-2-11-1-2024-02-14"},{"type":"WEB","url":"https://github.com/pypa/advisory-database/tree/main/vulns/scrapy/PYSEC-2024-162.yaml"},{"type":"PACKAGE","url":"https://github.com/scrapy/scrapy"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-10-28T02:31:13.826676076Z"}}