Closed Bug 1252210 Opened 9 years ago Closed 9 years ago

AntiSpam configuration is vulnerable to CSRF and persistent XSS

Categories

(bugzilla.mozilla.org :: Extensions, defect)

Production
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: ecfbugzilla, Assigned: dylan)

References

Details

(Keywords: sec-critical, wsec-xss)

Attachments

(1 file)

AntiSpam extension uses the EditTable extension for its configuration. The latter doesn't use any CSRF tokens however so that anybody can trick Bugzilla admins into changing configuration. The actual attack would most likely work by luring Bugzilla admins on a page containing the following code: > <img src="https://bugzilla-dev.allizom.org/page.cgi?id=edit_table.html&table=antispam_domain_blocklist&table_data={%22data%22:[[%22-%22,%22%3C/script%3E%3Cscript%3Ealert%28/xss/%29%3C/script%3E%22,%22%22]]}"> This particular link will add a new entry to the domain blocklist - invisibly, in the background. It could just as easily missed with block IP ranges or remove all table entries by sending a list like [[-1],[-2],[-3],...] to remove entries with ID 1, 2, 3 etc. What's even worse, this page is vulnerable to XSS, something that the URL above illustrates. The table data will be inserted as JSON into a script without further validation, if it contains something like "</script></script>alert(/xss/)</script>" that code will execute for anybody who opens the page later - persistent XSS vulnerability.
Taking this since it is my watch day.
Assignee: nobody → dylan
Depends on: 935570
Attached patch 1252210_1.patch (deleted) — Splinter Review
No more inline json, and CSRF tokens.
Attachment #8724962 - Flags: review?(dkl)
Flags: sec-bounty?
Comment on attachment 8724962 [details] [diff] [review] 1252210_1.patch Review of attachment 8724962 [details] [diff] [review]: ----------------------------------------------------------------- r=dkl
Attachment #8724962 - Flags: review?(dkl) → review+
To ssh://gitolite3@git.mozilla.org/webtools/bmo/bugzilla.git e5b9aa6..085c24c master -> master
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Group: bugzilla-security
Flags: sec-bounty? → sec-bounty+
Attachment #8727510 - Attachment description: trev.moz@adblockplus.org,3000?,2016-02-29,2016-03-01,2016-03-07,true,Wladimir Palant,, → trev.moz@adblockplus.org,3000,2016-02-29,2016-03-01,2016-03-07,true,Wladimir Palant,,
Component: Extensions: AntiSpam → Extensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: