CVE-2024-1968

CVE-2024-1968 is a medium-severity security vulnerability in Scrapy (pip), affecting versions < 2.11.2. It is fixed in 2.11.2.

Summary

Workarounds

There is no easy workaround for unpatched versions of Scrapy. You can replace the built-in redirect middlewares with custom ones patched for this issue, but you have to patch them yourself, manually.

References

This security issue was reported and fixed by @szarny at https://huntr.com/bounties/27f6a021-a891-446a-ada5-0226d619dd1a/.

Impact

Since version 2.11.1, Scrapy drops the Authorization header when a request is redirected to a different domain. However, it keeps the header if the domain remains the same but the scheme (http/https) or the port change, all scenarios where the header should also be dropped.

In the context of a man-in-the-middle attack, this could be used to get access to the value of that Authorization header

CVE-2024-1968 has a CVSS score of 5.9 (Medium). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (2.11.2); upgrading removes the vulnerable code path.

Affected versions

Scrapy (< 2.11.2)

Security releases

Scrapy → 2.11.2 (pip)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

Upgrade to Scrapy 2.11.2.

Frequently Asked Questions

  1. What is CVE-2024-1968? CVE-2024-1968 is a medium-severity security vulnerability in Scrapy (pip), affecting versions < 2.11.2. It is fixed in 2.11.2.
  2. How severe is CVE-2024-1968? CVE-2024-1968 has a CVSS score of 5.9 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of Scrapy are affected by CVE-2024-1968? Scrapy (pip) versions < 2.11.2 is affected.
  4. Is there a fix for CVE-2024-1968? Yes. CVE-2024-1968 is fixed in 2.11.2. Upgrade to this version or later.
  5. Is CVE-2024-1968 exploitable, and should I be worried? Whether CVE-2024-1968 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2024-1968 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2024-1968? Upgrade Scrapy to 2.11.2 or later.

Other vulnerabilities in Scrapy

CVE-2025-6176CVE-2024-1968CVE-2024-3572CVE-2024-3574CVE-2024-1892

Stop the waste.
Protect your environment with Kodem.