{"id":"CVE-2024-1892","aliases":["CVE-2024-1892","GHSA-cc65-xxvf-f7r9","PYSEC-2024-162"],"related":[],"kind":"vulnerability","state":"published","title":"ReDoS Vulnerability in scrapy/scrapy's XMLFeedSpider","summary":"A Regular Expression Denial of Service (ReDoS) vulnerability exists in the XMLFeedSpider class of the scrapy/scrapy project, specifically in the parsing of XML content. By crafting malicious XML content that exploits inefficient regular expression complexity used in the parsing process, an attacker can cause a denial-of-service (DoS) condition. This vulnerability allows for the system to hang and consume significant resources, potentially rendering services that utilize Scrapy for XML processing unresponsive.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"A Regular Expression Denial of Service (ReDoS) vulnerability exists in the XMLFeedSpider class of the scrapy/scrapy project, specifically in the parsing of XML content. By crafting malicious XML content that exploits inefficient regular expression complexity used in the parsing process, an attacker can cause a denial-of-service (DoS) condition. This vulnerability allows for the system to hang and consume significant resources, potentially rendering services that utilize Scrapy for XML processing unresponsive.","source":"cvelist"},{"lang":"en","text":"### 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/).","format":"markdown","source":"ghsa"},{"lang":"es","text":"Se descubrió que partes de la API Scrapy eran vulnerables a un ataque ReDoS. Manejar una respuesta maliciosa podría causar un uso extremo de CPU y memoria durante el análisis de su contenido, debido al uso de expresiones regulares vulnerables para ese análisis.","source":"nvd"}],"published":"2024-02-15T15:22:02.000Z","modified":"2026-06-17T07:05:14.030Z","severity":{"scorer":"@huntr_ai","scheme":"CVSS:3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"@huntr_ai","scheme":"CVSS:3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","score":6.5,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","score":6.5,"rating":"MEDIUM"}],"cwes":["CWE-1333"],"affected":[{"ranges":[{"type":"custom","introduced":"unspecified","fixed":"2.11","status":"affected"}],"vendor":"scrapy","product":"scrapy/scrapy","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"0","fixed":"2.11","status":"affected"}],"vendor":"scrapy","product":"scrapy","cpe":"cpe:2.3:a:scrapy:scrapy:*:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"2","status":"affected","fixed":"2.11.1"}],"ecosystem":"PyPI","package":"scrapy","purl":"pkg:pypi/scrapy","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.8.4"}],"ecosystem":"PyPI","package":"scrapy","purl":"pkg:pypi/scrapy","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"2.11.1"}],"vendor":"scrapy","product":"scrapy","cpe":"cpe:2.3:a:scrapy:scrapy:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"git","introduced":"0","status":"affected","fixed":"479619b340f197a8f24c5db45bc068fb8755f2c5"},{"type":"git","status":"affected","fixed":"479619b340f197a8f24c5db45bc068fb8755f2c5"},{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.11.1"}],"ecosystem":"PyPI","package":"scrapy","purl":"pkg:pypi/scrapy","repo":"https://github.com/scrapy/scrapy","source":"pysec"}],"references":[{"url":"https://huntr.com/bounties/271f94f2-1e05-4616-ac43-41752389e26b","tags":["evidence","exploit","fix","issue-tracking","patch","report","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/scrapy/scrapy/commit/479619b340f197a8f24c5db45bc068fb8755f2c5","tags":["fix","patch","web","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/scrapy/scrapy/security/advisories/GHSA-cc65-xxvf-f7r9","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/scrapy/scrapy/commit/73e7c0ed011a0565a1584b8052ec757b54e5270b","tags":["web"],"sources":["ghsa"]},{"url":"https://docs.scrapy.org/en/latest/news.html#scrapy-1-8-4-2024-02-14","tags":["web"],"sources":["ghsa"]},{"url":"https://docs.scrapy.org/en/latest/news.html#scrapy-2-11-1-2024-02-14","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/scrapy/PYSEC-2024-162.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/scrapy/scrapy","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/advisories/GHSA-cc65-xxvf-f7r9","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"@huntr_ai","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2024-03-05T16:44:39.898Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-1892","url":"https://www.cve.org/CVERecord?id=CVE-2024-1892","licence":"CVE Terms of Use","modified":"2024-08-11T14:28:49.917Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-cc65-xxvf-f7r9","url":"https://github.com/advisories/GHSA-cc65-xxvf-f7r9","licence":"CC-BY-4.0","modified":"2025-01-14T17:20:10.367Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-1892","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-1892","licence":"Public domain","modified":"2026-06-17T07:05:14.030Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2024-162","url":"https://osv.dev/vulnerability/PYSEC-2024-162","licence":"CC-BY-4.0","modified":"2026-06-10T17:02:40.004Z"}],"updatedAt":"2026-11-25T22:58:37.094Z","epss":{"score":0.00553,"percentile":0.47561,"date":"2026-12-01T12:00:22.000Z"}}