6.3medium
BlackSheep ClientSession is vulnerable to CRLF injection
- Severity
- 6.3medium CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.37% (higher than 32% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-6pw3-h7xf-x4gpPYSEC-2026-1222
Description
BlackSheep is an asynchronous web framework to build event based web applications with Python. Prior to 2.4.6, 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. This vulnerability is fixed in 2.4.6.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Neoteroi BlackSheep | < 2.4.6, before 2.4.6 | CVE List, NVD |
| blacksheep (PyPI) | before 2.4.6 | GitHub Advisory Database, PyPA Advisory Database |
All scores
| GitHub_M | 6.3medium CVSS:4.0 | 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 |
| GitHub | medium CVSS:4.0 | 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 |
| NVD | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N |
| PyPA Advisory Database | Not scored CVSS:4.0 | 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 |
Classification
What each source says
CVE List
BlackSheep is an asynchronous web framework to build event based web applications with Python. Prior to 2.4.6, 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. This vulnerability is fixed in 2.4.6.
GitHub Advisory Database
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
NVD (es)
BlackSheep es un framework web asíncrono para construir aplicaciones web basadas en eventos con Python. Antes de la versión 2.4.6, la implementación del Cliente HTTP en BlackSheep es vulnerable a la inyección CRLF. La falta de validación de encabezados hace posible que un atacante modifique las solicitudes HTTP (p. ej., insertar un nuevo encabezado) o incluso cree una nueva solicitud HTTP. La explotación requiere que los desarrolladores pasen la entrada de usuario no saneada directamente a los encabezados. La parte del servidor no se ve afectada porque BlackSheep delega a un servidor ASGI subyacente el manejo de los encabezados de respuesta. Esta vulnerabilidad se corrige en la versión 2.4.6.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-22779 changed 2026-01-14 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-6pw3-h7xf-x4gp changed 2026-07-07 | CC-BY-4.0 |
| NVD | CVE-2026-22779 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2026-1222 changed 2026-07-07 | CC-BY-4.0 |