CVE-2022-0577: Incorrect Authorization and Exposure of Sensitive Information in scrapy

scrapy Updated 02 Oct 2025

Summary

01/03/2022
Yes i
Moderate
6.5

CVE-2022-0577: Incorrect Authorization and Exposure of Sensitive Information to an Unauthorized Actor in scrapy. Affects scrapy across 2 version ranges.

< 1.8.2 >= 2.0.0, < 2.6.1

Fixed in 1.8.2 or 2.6.1, depending on the release line you run. How to fix ↓

Also tracked for

The same CVE-2022-0577 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Scrapy is an open-source web crawling framework written in Python. It provides a high-level API for efficiently scraping websites and extracting structured data. Scrapy is widely used for web scraping and data mining tasks due to its flexibility and scalability. However, a vulnerability has been discovered in scrapy that allows for incorrect authorization and exposure of sensitive information to an unauthorized actor.

Vulnerability Detail

The vulnerability in scrapy arises when manually defining cookies on a Request object that receives a redirect response. In such cases, the new Request object scheduled to follow the redirect retains the user-defined cookies, regardless of the target domain. This can lead to unauthorized access to sensitive information. The vulnerability has a CVSS score of 6.5, indicating a moderate severity level. The impact of this vulnerability includes potential data breaches and unauthorized access to user-specific information.

How To Fix

Latest published version: 2.19.0 as of 22 Oct 2026

pip install --upgrade "scrapy==2.19.0"

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 1.8.2 1.8.2
    pip install --upgrade "scrapy==1.8.2"
  • >= 2.0.0, < 2.6.1 2.6.1
    pip install --upgrade "scrapy==2.6.1"

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

If upgrading is not feasible, a workaround is to set cookies using a list of dictionaries instead of a single dictionary when defining cookies on a Request object. Each cookie should have the appropriate domain set. Additionally, cookies can be disabled altogether or limited to trusted domains using the appropriate Scrapy settings.

Conclusion

The vulnerability in scrapy allows for incorrect authorization and exposure of sensitive information to unauthorized actors. To mitigate this vulnerability, it is crucial to upgrade to the latest secure version of Scrapy (2.6.0 or higher). Alternatively, upgrading to Scrapy 1.8.2 is also an option. If upgrading is not feasible, workarounds such as setting cookies using a list of dictionaries or disabling cookies can be implemented. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for scrapy →

Share this vulnerability

FAQ

Scrapy is an open-source web crawling framework written in Python. It provides a high-level API for efficiently scraping websites and extracting structured data.

The vulnerability allows for incorrect authorization and exposure of sensitive information to an unauthorized actor. This can result in data breaches and unauthorized access to user-specific information.

To fix this vulnerability, it is recommended to upgrade to Scrapy 2.6.0 or higher. Alternatively, you can upgrade to Scrapy 1.8.2. It is important to update the Scrapy package to the latest secure version.

If upgrading is not possible, you can set cookies using a list of dictionaries instead of a single dictionary when defining cookies on a Request object. Additionally, cookies can be disabled or limited to trusted domains using Scrapy settings.

For more information, you can refer to the original report at huntr.dev or open an issue on the Scrapy GitHub repository.

Related vulnerabilities

Recent vulnerabilities recorded for scrapy.

How To Fix

Latest published version: 2.19.0 as of 22 Oct 2026

pip install --upgrade "scrapy==2.19.0"

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 1.8.2 1.8.2
    pip install --upgrade "scrapy==1.8.2"
  • >= 2.0.0, < 2.6.1 2.6.1
    pip install --upgrade "scrapy==2.6.1"

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback