PyPI: crawlee
CVE-2026-46497
Safety vulnerability ID: SFTY-20260521-65256
Safety legacy ID: pyup.io-98856
Affected versions of the crawlee package are vulnerable to Server-Side Request Forgery due to missing host and scheme validation on URLs derived from sitemap and robots.txt content. The SitemapRequestLoader, RobotsTxtFile.get_sitemaps(), and the _fetch_and_process_sitemap helper in src/crawlee/_utils/sitemap.py and src/crawlee/_utils/robots.py enqueue or directly dispatch sitemap entries through the configured HTTP client without invoking the Pydantic validate_http_url check, and the CurlImpersonateHttpClient backend additionally accepts non-http(s) schemes such as gopher, file, dict, and ftp. An attacker controlling a remote sitemap or robots.txt can coerce the crawler into issuing requests to internal hosts or to libcurl-supported non-HTTP protocols, enabling cross-host SSRF and protocol smuggling.
Overview
Crawlee for Python: SSRF via sitemap-derived URLs
Advisory
Affected versions of the crawlee package are vulnerable to Server-Side Request Forgery due to missing host and scheme validation on URLs derived from sitemap and robots.txt content. The SitemapRequestLoader, RobotsTxtFile.get_sitemaps(), and the _fetch_and_process_sitemap helper in src/crawlee/_utils/sitemap.py and src/crawlee/_utils/robots.py enqueue or directly dispatch sitemap entries through the configured HTTP client without invoking the Pydantic validate_http_url check, and the CurlImpersonateHttpClient backend additionally accepts non-http(s) schemes such as gopher, file, dict, and ftp. An attacker controlling a remote sitemap or robots.txt can coerce the crawler into issuing requests to internal hosts or to libcurl-supported non-HTTP protocols, enabling cross-host SSRF and protocol smuggling.
How to Fix
Mitigation and Workarounds
---
Vulnerable Functions
Functions linked to known vulnerabilities.
References
- https://getsafety.com/vulnerabilities/SFTY-20260521-65256/CVE-2026-46497
- https://github.com/apify/crawlee-python/security/advisories/GHSA-3r75-xc34-5f44
- https://nvd.nist.gov/vuln/detail/CVE-2026-46497
- https://github.com/apify/crawlee-python/releases/tag/v1.7.0
- https://github.com/advisories/GHSA-3r75-xc34-5f44
Verified by Safety
Our Cybersecurity Intelligence Team reviewed this vulnerability. We combine public data with our own research to find issues not yet reported to public sources.
Learn more
