Closed
Bug 13197
Opened 27 years ago
Closed 27 years ago
Injecting JavaScript code in the bookmarks file, may be executed
Categories
(Core :: Security, defect, P3)
Tracking
()
VERIFIED
FIXED
People
(Reporter: joro, Assigned: mozilla)
References
()
Details
Mozilla build 1999090408 (and earlier builds) allows executing JS code in the
"file" protocol by injecting code in the bookmarks file.
The problem are SCRIPT tags in the TITLE tag.
Demonstration and more info is available at:
http://www.nat.bg/~joro/mozilla/bookm2.html
Comment 1•27 years ago
|
||
Since we wrote the bookmarks.html parser by hand, I _know_ that we won't be
executing any JS when the file is parsed. How _exactly_ does the JS get run?
From the description, it looks like you need to open the bookmarks file as a
local HTML document, in which case, the normal content/chrome distinction needs
to ensure that no evil JS can run.
Yes, you can save _any_ URL as a bookmark (including "javascript:" URLs).
However, that is a _good_ thing (e.g., bookmarklets a la 4.x).
IMO, we need to fix the code that does the URL dispatching for bookmarks (which
AFAIK is exactly the same as, e.g., the URL dispatching on an anchor tag).
Comment 2•27 years ago
|
||
Ok, I think I misunderstood the problem. Ignore my raving.
| Assignee | ||
Comment 3•27 years ago
|
||
We should prevent <SCRIPT> from being saved in bookmark titles,
descriptions, etc... that should plug the security hole.
Comment 4•27 years ago
|
||
Yes, the same issue came up on 4.x (from Guninski as well) and I just made sure
to escape the text that's saved so that the SCRIPT tag doesn't execute. We also
need to make sure that JavaScript entities are quoted as well.
See http://scopus.mcom.com/bugsplat/show_bug.cgi?id=351591 for the 4.x exploit.
| Assignee | ||
Updated•27 years ago
|
Status: NEW → RESOLVED
Closed: 27 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 5•27 years ago
|
||
Fixed.
Bulk moving all Browser Security bugs to new Security: General component. The
previous Security component for Browser will be deleted.
Component: Security → Security: General
You need to log in
before you can comment on or make changes to this bug.
Description
•