CSRF vulnerability in token.cgi allows possible unauthorized password reset e-mail request

RESOLVED FIXED in Bugzilla 4.2

Status

()

defect
--
minor
RESOLVED FIXED
8 years ago
6 years ago

People

(Reporter: netfuzzerr, Assigned: LpSolit)

Tracking

({sec-low})

unspecified
Bugzilla 4.2
Bug Flags:
approval +
approval4.2 +

Details

(Whiteboard: [infrasec:csrf][ws:low])

Attachments

(2 attachments, 1 obsolete attachment)

(Reporter)

Description

8 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.8 (KHTML, like Gecko) Chrome/17.0.942.0 Safari/535.8

Steps to reproduce:

Well, i'm reporting only because, this can do spam. But, risk to security don't have any.
Guys, if you want fix, there are the demo: https://landfill.bugzilla.org/bugzilla-tip/token.cgi?a=reqpw&loginname=demo@csrf.com
Yeah, this is pretty minor. But we should still hash-token it the same way we did for createaccount.
Severity: normal → minor
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee: administration → user-accounts
Component: Administration → User Accounts
Whiteboard: [infrasec:csrf][ws:low]
Posted patch patch - v1 (obsolete) — Splinter Review
Assignee: user-accounts → reed
Status: NEW → ASSIGNED
Attachment #598315 - Flags: review?(LpSolit)
Summary: CSRF in password reset → CSRF vulnerability in token.cgi allows possible unauthorized password reset e-mail request
Target Milestone: --- → Bugzilla 4.2
(Assignee)

Comment 3

7 years ago
Comment on attachment 598315 [details] [diff] [review]
patch - v1

If someone accesses token.cgi directly, it will now get the "Suspicious Action" confirmation page (which I can live with, though I still don't think this bug must be fixed). But if the user clicks the confirmation button, it fails complaining that the page doesn't exist.
Attachment #598315 - Flags: review?(LpSolit) → review-
Keywords: sec-low
(Assignee)

Updated

7 years ago
Duplicate of this bug: 772809
(Reporter)

Updated

7 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → INVALID
(Assignee)

Comment 5

7 years ago
Please leave this bug alone. Just because a bug is not fixed immediately doesn't mean it will never be fixed. And if we decide it's minor enough to not be fixed, we will close it as wontfix, not invalid.
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
(Reporter)

Comment 6

7 years ago
lol...
(Assignee)

Comment 7

7 years ago
Posted patch patch, v2Splinter Review
The reason of the error I mentioned in comment 3 is because both global/confirm-action.html.tmpl and account/auth/login-small.html.tmpl use a variable named "script_name", and so login-small.html.tmpl was overwritting the value passed to confirm-action.html.tmpl. The fix is to simply rename the variable in login-small.html.tmpl to something else.
Assignee: reed → LpSolit
Attachment #598315 - Attachment is obsolete: true
Status: REOPENED → ASSIGNED
Attachment #649151 - Flags: review?(reed)
Comment on attachment 649151 [details] [diff] [review]
patch, v2

r=reed

works as expected, and direct access to token.cgi with loginname=email@address.tld&a=reqpw shows the suspicious action page, and I am able to continue passed it fine.
Attachment #649151 - Flags: review?(reed) → review+
(Assignee)

Comment 9

7 years ago
I will have to backport the patch to 4.2 as token.cgi is very different between 4.2 and 4.4.
Flags: approval+
(Assignee)

Comment 10

7 years ago
Backport for 4.2. No code change, only fixed a conflict in token.cgi.
Attachment #649311 - Flags: review?(reed)
Comment on attachment 649311 [details] [diff] [review]
patch for 4.2, v1

Technically, you're doing the check in token.cgi in a different spot than trunk, but not sure it really matters. Though, I suspect it makes more sense to get the super-basic checks done (like valid e-mail address format) before doing token check (which can take more perf), but whatever...
Attachment #649311 - Flags: review?(reed) → review+
(Assignee)

Updated

7 years ago
Flags: approval4.2+
(Assignee)

Comment 12

7 years ago
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/trunk/
modified token.cgi
modified template/en/default/account/auth/login-small.html.tmpl
modified template/en/default/account/auth/login.html.tmpl
Committed revision 8330.


Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/4.2/
modified token.cgi
modified template/en/default/account/auth/login-small.html.tmpl
modified template/en/default/account/auth/login.html.tmpl
Committed revision 8114.
Group: bugzilla-security
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago7 years ago
Keywords: relnote
Resolution: --- → FIXED
(Assignee)

Updated

7 years ago
Keywords: relnote
(Assignee)

Updated

6 years ago
Blocks: 850126
You need to log in before you can comment on or make changes to this bug.