-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
gh-142533: Document CRLF injection vulnerability in http.server and wsgiref modules #143395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
gh-142533: Document CRLF injection vulnerability in http.server and wsgiref modules #143395
Conversation
… and wsgiref modules
|
Hi, according to the Dev Guide, the document only changes don't need a news entry file. |
Doc/library/http.server.rst
Outdated
| This method does not reject input containing CRLF sequences allowing the | ||
| possibility of CRLF injection, where a single method call can inject | ||
| multiple arbitrary headers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| This method does not reject input containing CRLF sequences allowing the | |
| possibility of CRLF injection, where a single method call can inject | |
| multiple arbitrary headers. | |
| This method does not reject input containing CRLF sequences. |
Only mention the possibility of CRLF injection in the security consideration section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the suggestion. Addressed for both modules
Doc/library/wsgiref.rst
Outdated
| This method does not reject input containing CRLF sequences allowing the | ||
| possibility of CRLF injection, where a single method call can inject | ||
| multiple arbitrary headers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto.
| Security considerations | ||
| ----------------------- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please format this the same as we did for Http.server, that is: add a label and enough blank lines.
This change documents the CRLF injection vulnerability for http headers in
http.serverandwsgirefmodules.Initial report in #142533 focused on
http.serveronly, though further discussion suggested also addressing a closely related vulnerability inwsgirefreferenced in related issues #55880 and #72964.After discussing #142605, we pivoted from a direct fix to a documentation update because a fix would disrupt users who rely on using the vulnerability for non-malicious purposes.
The change documents the low-level vulnerability (i.e. absence of checking for CRLF) in mehod-specific sections while describing the high level implications (i.e. assuming sanitized input) under the "Security considerations" section.
http.server#142533📚 Documentation preview 📚: https://cpython-previews--143395.org.readthedocs.build/