BIT-python-2026-0672: Header injection in http.cookies.Morsel

Published Jan 20, 2026
·
Updated

When using http.cookies.Morsel, user-controlled cookie values and parameters can allow injecting HTTP headers into messages. Patch rejects all control characters within cookie names, values, and parameters.

Affected Software

1 affected component
Python Software Foundation Python

Event History

Jan 20, 2026
CVE Published
via OSV·09:52 PM
Data Sourced
via OSV·09:52 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

What input must be attacker-controlled for exploitation to be possible?

An attacker must be able to supply or influence cookie names, values, or parameters passed to http.cookies.Morsel. Exploitation relies on control characters being accepted in those fields, allowing HTTP headers to be injected into messages.

2

How can exposure be reduced if the patch cannot be applied immediately?

Do not pass untrusted data directly into Morsel cookie names, values, or parameters. Reject or remove all control characters from those inputs before constructing cookies.

3

How can I determine whether an application may be affected?

Review uses of http.cookies.Morsel and trace the sources of cookie names, values, and parameters. The application may be affected where any of those fields can contain user-controlled data without validation that rejects control characters.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203