GitHub Advisoryadvisory · PyPI

GHSA-6pw3-h7xf-x4gp BlackSheep's ClientSession is vulnerable to CRLF injection

MEDIUM Published 2026-01-14 Modified 2026-01-14 Official page ↗
Aliases
CVE-2026-22779
Ecosystem
PyPI
Packages
blacksheep
Severity
Moderate
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
Weaknesses
CWE-113, CWE-93
Reviewed
2026-01-14

Affected packages

• PyPI blacksheep: < 2.4.6 → fixed in 2.4.6

Description

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

Related

Alias · CVE (1)

  • CVE-2026-22779 BlackSheep is an asynchronous web framework to build event based web applications with Python. vulnerability

Weakness · CWE (2)

  • CWE-113 Improper Neutralization of CRLF Sequences in HTTP Headers weakness
  • CWE-93 Improper Neutralization of CRLF Sequences weakness

References