Closed
Bug 246743
Opened 22 years ago
Closed 22 years ago
"category" isn't escaped (XSS security hole)
Categories
(addons.mozilla.org Graveyard :: Public Pages, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: jruderman, Assigned: wolf)
References
()
Details
(Keywords: wsec-xss)
http://update.mozilla.org/extensions/moreinfo.php?id=35&vid=36&category=%22%3Cscript%3Ealert(5)%3C/script%3E
demonstrates an XSS hole in update.mozilla.org.
Impact:
* XPI whitelisting is useless until this hole is fixed.
* Attackers can spoof content on update.mozilla.org (including the
update.mozilla.org front page).
| Reporter | ||
Updated•22 years ago
|
Summary: "category" param is an XSS security hole → "category" isn't escaped (XSS security hole)
| Assignee | ||
Updated•22 years ago
|
Status: NEW → ASSIGNED
OS: Windows XP → All
| Assignee | ||
Comment 1•22 years ago
|
||
I put a fix for this online..
Jesse, since you're alot better at security than me, does that fix appear to
have solved the issue?
| Reporter | ||
Comment 2•22 years ago
|
||
It seems like you fixed it by stripping out <> tags. I can still break the
page:
http://update.mozilla.org/extensions/moreinfo.php?id=35&vid=36&category=%22%3Efoo
Maybe I can't inject scripts anymore, but I'm not sure. It would be easier to
convince me that you've fixed the hole if you fixed it by making the page
correct -- by escaping <>&" as HTML entities when they appear in hrefs.
Does the fix you've implemented apply to every field being read in?
A HREF="moreinfo.php?id=35&vid=36&category="alert(5)&page=releases"
That has three quotes in it. My prefereence would be a sanitize() function that
runs through all variables.
| Assignee | ||
Comment 4•22 years ago
|
||
The fix is.
//Attempt to fix Bug 246743
foreach ($_GET as $key => $val) {
$_GET["$key"] = str_replace("\\","",strip_tags($_GET["$key"]));
}
Applied globally before any data is output.
It's not an ideal fix, more of a "prevent anything bad from being done" method
to limit the security implications of the bug quickly type thing, I'm realizing
now. :-/
I really should not print anything from $_get in the page w/o verifying it
matches something expected, you broke the page because of that. :-/
So, this bug remains open.. better fix forthcoming.
| Assignee | ||
Comment 6•22 years ago
|
||
*** Bug 247318 has been marked as a duplicate of this bug. ***
| Assignee | ||
Comment 7•22 years ago
|
||
Bug 247318 and this one both appear to have the same root cause to me.. lacking
data integrity checking. Bug 247318 deals with the unlaunched admin portions of
the site, which are known untested and incomplete. (which is why they're not up
yet. )
The reason I filed a separeate bug is that these are separate issues in terms of
coding. And I'm filing bugs against the unreleased backend so that they get
fixed _before_ it is released.
| Assignee | ||
Comment 9•22 years ago
|
||
The fix for Bug 248242 also affects this bug, which should be fixed now also.
The entities in the URL should now be escaped, as well as html tags removed
entirely, the pages will still "look" broke in some cases, since the URLs were
not valid, but that's a seperate issue.
Marking as fixed, reopen if i'm wrong. :-)
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
| Assignee | ||
Updated•21 years ago
|
Group: security
Component: Update → Web Site
Product: mozilla.org → Update
Version: other → unspecified
| Assignee | ||
Updated•21 years ago
|
Group: webtools-security
Updated•21 years ago
|
Group: webtools-security
Updated•21 years ago
|
Group: update-security
| Reporter | ||
Comment 10•19 years ago
|
||
Can this be made public now?
| Assignee | ||
Comment 11•19 years ago
|
||
Should be. I'd hope all of the Update 1.0-era security bugs (which afaik were all fixed.) are open at this point.
| Reporter | ||
Updated•19 years ago
|
Group: update-security
Comment 12•13 years ago
|
||
Adding keywords to bugs for metrics, no action required. Sorry about bugmail spam.
Keywords: wsec-xss
Updated•10 years ago
|
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•