CVE-2026-22779: Blacksheep BlackSheep's ClientSession Is Vulnerable To Vulnerability

MODERATE
Advisory Identifier: GHSA-6pw3-h7xf-x4gp
CWE-113 CWE-93
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2026-22779
GHSA Identifier GHSA-6pw3-h7xf-x4gp
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting')
Affected Product Blacksheep
Package Ecosystem PyPI
Published Date
Last Updated

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.

blacksheep fixed: 2.4.6
pip install blacksheep>=2.4.6
Verify Direct and Transitive Dependencies

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

### 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

CVE-2026-22779 Affected Blacksheep Versions

1 component(s)
Fixed Versions:
2.4.6
Product / Package Ecosystem Affected Versions Fixed Version
blacksheep
PyPI
< 2.4.6
2.4.6

References

Frequently Asked Questions

What is CVE-2026-22779?
CVE-2026-22779 is a security vulnerability in Blacksheep involving BlackSheep's ClientSession is vulnerable to CRLF injection under CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting').
Which Blacksheep versions are affected?
Affected versions include releases prior to 2.4.6 across affected packages: blacksheep.
What version fixes CVE-2026-22779?
Upgrading to 2.4.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is blacksheep affected?
Yes, blacksheep is affected in releases prior to 2.4.6. Upgrade your dependency to 2.4.6 or later.
What CWE is associated with CVE-2026-22779?
CVE-2026-22779 is classified under CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting') (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.).
How can I check PyPI dependencies for CVE-2026-22779?
Run the dependency tree command: 'pip show blacksheep'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}