Skip to content
Disclosed report CVE-2012-0465

[SECURITY] User lockout policy can be bypassed by altering the X-FORWARDED-FOR header

Soroush Dalili Follow

Originally disclosed on Mozilla

  • Fixed in 60 days
  • Paid in 21 months
  • Disclosed after 60 days
Text
User Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)

Steps to reproduce:

It is possible to bypass the user lockout policy by using the "X-FORWARDED-FOR" in the header of the request. 
The problem is because of the "remote_ip" function in "Bugzilla/Util.pm" which adds this header value to the user's IP address (there is also no validation on this field). However, this "X-FORWARDED-FOR" can be controlled by an attacker to brute force the other people username/password. The "remote_ip" function also has been used in lockout modules ("Bugzilla/User.pm: account_ip_login_failures()") which is the reason of having this issue.

Please let me know if it can be eligible for the bug bounty too.


Actual results:

It is possible to brute force a password without being locked by setting the "X-FORWARDED-FOR" value in the header of the authentication request to one of these:
1- A complete random IP or String
2- A string with the length of more than 26 characters. Ex.: "123456789012345678901234567"


Expected results:

It should prevent from brute force attack.
My recommendation is:
1- First we need to have a complete validation (characters, length, format) for $ENV{'HTTP_X_FORWARDED_FOR'} in the "remote_ip" function.
2- This value should not be used in the user's lockout process as it can be controlled by the user. Only the main IP address should be fine for this action ($ENV{'REMOTE_ADDR'}) although it can be a proxy IP address.

The original report as published on Mozilla's Bugzilla, by Soroush Dalili. 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 security bug in User Accounts. Mozilla made it public on 18 April 2012 as CVE-2012-0465.

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

More by Soroush Dalili

View all

6 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.