Skip to content
Smuggling / CRLF Disclosed report Intermediate CVE-2016-5699

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.

guido Follow

Originally disclosed on HackerOne

  • 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

The original report as published on HackerOne, by guido. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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.

More by guido

View all

49 more disclosed reports, best first.

More from Internet Bug Bounty

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Request smuggling and header injection

The lesson behind this report.

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.