Medium

BlackSheep's ClientSession is vulnerable to CRLF injection

  • Disclosed: 14.01.2026
  • Updated: 11.10.2026 13:19

Impact

The HTTP Client implementation in BlackSheep is vulnerable to CRLF injection. Missing headers validation makes it possible for an attacker to modify the HTTP requests (e.g. insert a new header) or even create a new HTTP request. Exploitation requires developers to pass unsanitized user input directly into headers. The server part is not affected because BlackSheep delegates to an underlying ASGI server handling of response headers.

Attack vector: Applications using user input in HTTP client requests (method, URL, headers).

Patches

Users who use the HTTP Client in BlackSheep should upgrade to 2.4.6.

Workarounds

If users handle headers from untrusted parties, they might reject values for header names and values that contain carriage returns.

References

https://owasp.org/www-community/vulnerabilities/CRLF_Injection

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Python (PyPI) blacksheep < 2.4.6 2.4.6

References

CVSS score -
CVSS vector
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
Weakness (CWE)
CWE-113, CWE-93
Platform
Python (PyPI)
Package
blacksheep
Disclosed
14.01.2026
Updated
11.10.2026 13:19

Sources and licenses

OSV / GitHub Advisory Database - PYSEC-2026-1222 - PyPA Advisory Database; CC BY 4.0

OSV / GitHub Advisory Database - GHSA-6pw3-h7xf-x4gp - CC BY 4.0

Vulnerability history: blacksheep

All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.

This is the only known vulnerability of this package.

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.