CVE-2026-22779: Blacksheep BlackSheep's ClientSession Is Vulnerable To Vulnerability
MODERATECVE-2026-22779 is a MODERATE blacksheep's clientsession is vulnerable to vulnerability (CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting')) affecting Blacksheep libraries in the PyPI ecosystem. The issue involves blacksheep's clientsession is vulnerable to crlf injection. Remediation is available by upgrading affected packages to version 2.4.6.
CVE-2026-22779 at a Glance
How to Fix CVE-2026-22779
To remediate this vulnerability, upgrade all affected Blacksheep dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install blacksheep>=2.4.6
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show blacksheep
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-22779, inspect your installed packages using pip:
pip show blacksheep
Analyze the terminal output to locate any version of Blacksheep in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.4.6), your application is affected.
Note: The pip show blacksheep command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting'), where the product receives data from an http agent/component (e.g., web server, proxy, browser, etc.), but it does not neutralize or incorrectly neutralizes cr and lf characters before the data is included in outgoing http headers. In Blacksheep, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-22779 Affected Blacksheep Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
blacksheep
|
PyPI |
< 2.4.6
|
2.4.6
|
References
Frequently Asked Questions
What is CVE-2026-22779?
Which Blacksheep versions are affected?
What version fixes CVE-2026-22779?
Is blacksheep affected?
What CWE is associated with CVE-2026-22779?
How can I check PyPI dependencies for CVE-2026-22779?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6pw3-h7xf-x4gp",
"modified" : "2026-01-14T19:50:38Z",
"published" : "2026-01-14T16:52:53Z",
"aliases" : [ "CVE-2026-22779" ],
"summary" : "BlackSheep's ClientSession is vulnerable to CRLF injection",
"details" : "### Impact\nThe 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.\nExploitation requires developers to pass unsanitized user input directly into headers.\nThe server part is not affected because BlackSheep delegates to an underlying ASGI server handling of response headers.\n\n**Attack vector:** Applications using user input in HTTP client requests (method, URL, headers).\n\n### Patches\nUsers who use the HTTP Client in BlackSheep should upgrade to `2.4.6`.\n\n### Workarounds\nIf users handle headers from untrusted parties, they might reject values for header names and values that contain carriage returns.\n\n### References\nhttps://owasp.org/www-community/vulnerabilities/CRLF_Injection",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "blacksheep"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.4.6"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/Neoteroi/BlackSheep/security/advisories/GHSA-6pw3-h7xf-x4gp"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-22779"
}, {
"type" : "WEB",
"url" : "https://github.com/Neoteroi/BlackSheep/commit/bd4ecb9542b5d52442276b5a6907931b90f38d12"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/Neoteroi/BlackSheep"
}, {
"type" : "WEB",
"url" : "https://github.com/Neoteroi/BlackSheep/releases/tag/v2.4.6"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-113", "CWE-93" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-01-14T16:52:53Z",
"nvd_published_at" : "2026-01-14T17:16:09Z"
}
}