Closed Bug 276985 Opened 21 years ago Closed 19 years ago

XSS vulnerability in registry/who.cgi

Categories

(Webtools Graveyard :: Tinderbox, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mikx, Assigned: justdave)

References

()

Details

(Keywords: wsec-xss)

Attachments

(1 file, 4 obsolete files)

http://tinderbox.mozilla.org/registry/who.cgi?email=<script>alert (document.cookie)</script> http://tinderbox.mozilla.org/bonsai/cvsquery.cgi? module=MozillaBranchTinderboxAll&branch=MOZILLA_1_7_BRANCH&date=explicit&mindate =><script>alert(document.cookie)</script> Tested with Internet Explorer 6 using WinXP SP2
This XSS issue seems to be also part of tinderbox (sometimes the mozilla.org domain structure is a little confusing to me...) http://axolotl.mozilla.org/graph/query.cgi? testname=pageload&tbox=btek&autoscale=1&days=7&avg=1&showpoint=qwertz"><script>a lert(document.cookie)</script>
I think the graph.cgi got fixed elsewhere, and cvsquery.cgi is bug 146244 Reassigning to justdave, and confirming because who.cgi is still borked. Not sure you could do much interesting with an XSS on tinderbox (or mecha, which includes bonsai and lxr). Are there admin pages on any of those services? If so you could craft an attack against someone with admin privs to do something interesting. Ooh, yes, of course there are, "administrate tinderbox trees". That page requires a password for every submit though... there are probably others I'm not privy to.
Assignee: mcafee → justdave
Status: UNCONFIRMED → NEW
Ever confirmed: true
QA Contact: timeless → tinderbox
Attached patch patch - v1 (not tested) (obsolete) — Splinter Review
I haven't tested this yet, but it looks somewhat sane. I also fixed some perl warnings while I was at it.
Assignee: justdave → reed
Status: NEW → ASSIGNED
Attachment #249932 - Flags: review?(LpSolit)
Summary: XSS vulnerability in who.cgi and cvsquery.cgi → XSS vulnerability in registry/who.cgi
Attached patch patch - v2 (obsolete) — Splinter Review
I did some more clean-up to make the file more readable.
Attachment #249932 - Attachment is obsolete: true
Attachment #249942 - Flags: review?(justdave)
Attachment #249932 - Flags: review?(LpSolit)
Comment on attachment 249942 [details] [diff] [review] patch - v2 I don't think there's any real way this can be exploited, but if we're going to fix it, the extra text and extra url fields in load_extra_data() should be quoted as well.
Attachment #249942 - Flags: review?(justdave) → review-
Attached patch patch - v3 (obsolete) — Splinter Review
Encode/quote everything and remove shell_encode().
Attachment #249942 - Attachment is obsolete: true
Attachment #249955 - Flags: review?(zach)
Attachment #249955 - Flags: review?(zach) → review+
Attached patch patch - v3.1 (obsolete) — Splinter Review
This is what I will check-in, as soon as the patch for 280464 is reviewed and ready.
Attachment #249955 - Attachment is obsolete: true
Attachment #249982 - Flags: review+
Blocks: 280464
No longer blocks: 280464
Attached patch Patch v4Splinter Review
OK, based on discussion on bug 280464 and on IRC, here's a do-over. This completely replaces who.cgi. Since the entire thing is basically a re-presentation of data passed in via the query string, the entire thing has been moved into a Template Toolkit template. This makes it painless to keep track of what's been escaped and what hasn't, etc.
Assignee: reed → justdave
Attachment #249982 - Attachment is obsolete: true
Attachment #250146 - Flags: review?
Blocks: 365619
Attachment #250146 - Flags: review? → review+
Checking in who.cgi; /cvsroot/mozilla/webtools/registry/who.cgi,v <-- who.cgi new revision: 1.12; previous revision: 1.11 done RCS file: /cvsroot/mozilla/webtools/registry/who.html.tmpl,v done Checking in who.html.tmpl; /cvsroot/mozilla/webtools/registry/who.html.tmpl,v <-- who.html.tmpl initial revision: 1.1 done
Group: webtools-security
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Adding keywords to bugs for metrics, no action required. Sorry about bugmail spam.
Keywords: wsec-xss
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: