urllib HTTP header injection CVE-2016-5699
The Python httplib library did not properly validate arguments to HTTPConnection.putheader(), allowing an attacker to inject additional HTTP headers when a Python application passed user-controlled header names or values. This could let an attacker alter the request sent to a server.
- Fixed in under an hour
- Paid in under an hour
- Disclosed after under an hour
Summary by the program
It was found that the Python's httplib library (used by urllib, urllib2 and others) did not properly check HTTPConnection.putheader() function arguments. An attacker could use this flaw to inject additional headers in a Python application that allowed user provided header names or values.
More details: https://bugs.python.org/issue22928
The report
https://bugs.python.org/issue22928 https://access.redhat.com/security/cve/cve-2016-5699
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the putheader() function did not reject header names or values containing newline characters, so user input could break out of the intended header line and add new ones.
Impact
An attacker could inject additional headers into HTTP requests made by a Python application that used user-provided header names or values, potentially altering the request.
What the attacker needed
Python application passes user input as header name or value
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When a program sends a web request, it includes headers, which are like labels with extra information. This bug meant that if a program let a user supply part of a header, the user could sneak in extra headers that the program did not intend. That could change how the receiving server handles the request.
What is Smuggling / CRLF?
A front end and a back end split one connection's bytes into requests differently, letting an attacker hide a request inside another user's.