Closed Bug 35859 Opened 26 years ago Closed 25 years ago

loading chrome: urls in a window

Categories

(Core :: Security, defect, P3)

x86
Windows NT
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: norrisboyd, Assigned: security-bugs)

References

()

Details

(Whiteboard: [nsbeta2+])

Subject: BUG: loading chrome: urls in a window Date: Fri, 14 Apr 2000 16:39:15 +0300 From: Georgi Guninski <joro@nat.bg> To: Norris Boyd <norris@netscape.com> Normally Mozilla does not allow loading chrome: urls (using <A>,window.open(),redirects, etc.) But it is possible to circumvent this using <BASE HREF="...">. I cannot make a dangerous exploit now, but if another bug pops up it may be possible to create a bad exploit. The code is: --------------------------------------------------------------- <SCRIPT> a=window.open("about:blank","a"); </SCRIPT> <BASE HREF="chrome://messenger/content/messenger.xul?"> <A HREF="#" TARGET="a">chrome</A> ---------------------------------------------------------------
Status: NEW → ASSIGNED
Target Milestone: --- → M16
The problem is in nsHTMLFrameInnerFrame::Reflow. The code calls aPresContext->GetBaseURL to get a URL to use as the current page's URL to determine if it can load the new URL. But of course BASE HREF changes that. I can't find any other means in nsHTMLFrameInnerFrame::Reflow to obtain the URL of the current page.
Keywords: beta2
Keywords: nsbeta2
Bulk reassigning most of norris's bugs to mstoltz.
Assignee: norris → mstoltz
Status: ASSIGNED → NEW
[nsbeta2+]
Whiteboard: [nsbeta2+]
Changed QA contact to Cathy.
QA Contact: junruh → czhang
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Fixed by adding CheckLoadURI check to BASE tag processing. Cathy, could you try some variations on this bug and make sure the hole is closed? Marking FIXED.
*** Bug 38829 has been marked as a duplicate of this bug. ***
Flags: testcase+
Flags: in-testsuite+ → in-testsuite?
You need to log in before you can comment on or make changes to this bug.