Skip to content
Disclosed report CVE-2015-7208

allowing vertical tab in cookies leads to cookie injection on some servers

todayisnew Follow

Originally disclosed on Mozilla

  • Fixed in 50 days
  • Paid in 54 days
  • Disclosed after 50 days
Text
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.125 Safari/537.36

Steps to reproduce:

Description:

Firefox allows storing vertical tabs (ASCII 11) in cookies being set.
When later replayed by the browser, they can be interrupted by parser as a new line
This allows setting arbitrary cookies for user.

Example case:


1) 

User visits http://www.doyoulikepizza.com, it asks of course do you like pizza?

It parses this user submited data and stores it in a cookie named likespizza.

This data is cleaned for xss, or injection but allows through a vertical tab since there is no harm IE, and Chrome do not allow saving vertical tabs in cookies.

This cookie is roughly stored in the jar as:

likespizza:true;{vertialtab}currentsessionpassword:12345678


2) 

Malicious user sends link which injects value to set likespizza to create user cookie;

http://www.doyoulikepizza.com?pizzaparty.php?likespizza=true;{verticaltab}currentsessionpassword:12345678;

3) Impact:

When victum vists http://www.doyoulikepizza.com firefox sends the current stored cookie for doyoulikepizza.com

When we visit the site we should have the vertical tab just be parsed as a regular character

GET / http/1.0
Host: doyoulikepizza.com
Cookie: likespizza:true;{vertialtab}currentsession:12345678

But with the middle parser Nginx / lighttp / apache / django etc might parses the vertical tab as a /n or /r so we get a,

GET / http/1.0
Host: doyoulikepizza.com
Cookie: likespizza:true;
Cookie: currentsessionpassword:12345678;

Impact

Many sites facebook google etc, parse http only cookies from url or user submitted content, its an injection point for this type 
of exploit, the middle parser tried to be helpful but can't be trusted to properly parse the vertical tab.

Suggestion:

Firefox should filter non standard characters from cookie data, if other browsers do not support them then it is unlikely a developer will
use these characters in cookie data, also if wanted to be used we can base64 encode the data for the cookie to keep it safe and return the characters vertical tab etc inside.

The original report as published on Mozilla's Bugzilla, by todayisnew. Images and videos are our own copies; raw HTML is shown as text. View it on Mozilla's Bugzilla.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

What is known

A medium-severity security bug in Networking: Cookies. Mozilla made it public on 24 September 2015 as CVE-2015-7208.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

More by todayisnew

View all

12 more disclosed reports, best first.

More from Mozilla

View all

The newest disclosed reports for this program.

Similar reports

Same bug class and techniques, clearest first.