Description
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.
Problem types
Product status
Any version before 3.13.12
3.14.0 (python) before 3.14.3
3.15.0a1 (python) before 3.15.0a6
Credits
Omar M. Hasan
References
github.com/python/cpython/pull/143920
github.com/python/cpython/issues/143919
mail.python.org/.../thread/6VFLQQEIX673KXKFUZXCUNE5AZOGZ45M/
github.com/...ommit/95746b3a13a985787ef53b977129041971ed7f70
github.com/...ommit/712452e6f1d4b9f7f8c4c92ebfcaac1705faa440
github.com/...ommit/62700107418eb2cca3fc88da036a243ea975f172
github.com/...ommit/7852d72b653fea0199acf5fc2a84f6f8b84eba8d
github.com/...ommit/918387e4912d12ffc166c8f2a38df92b6ec756ca
github.com/...ommit/b1869ff648bbee0717221d09e6deff46617f3e85