Closed Bug 768872 Opened 12 years ago Closed 12 years ago

jar: allows Java to read arbitrary ZIP files across origins (including ODT files)

Categories

(Plugins Graveyard :: Java (Oracle), defect)

x86_64
Windows 7
defect
Not set
major

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: freddy, Unassigned)

References

Details

(Keywords: sec-high, sec-vector, Whiteboard: cross-browser in applet form)

Attachments

(2 files)

Attached file Proof of Concept
I just fund a way to read arbitrary ZIP files on other origins. This includes listing the files contained in the ZIP as well as their content.
Since other file formats build on ZIPs, we can read .odt and .docx files as well.

Because of LiveConnect, my PoC requires Java. It has been tested with Java7 Update 5 on a Windows 7 x64 virtual machine.
Does this actually work on the web? If you run this from a file:/// URI then java seems to think all "no host" urls are "local", and jar:scheme: looks like no host to them. WIll try it after this mtg.

Fixed in Firefox 15 by bug 748343 (removal of window.java and window.Package)
It *does* work from the web... I find this surprising. What else is broken?.
Keywords: sec-high
Does this work within an applet? It's java making the connection and supposedly validating the origins. If they're not validating the net origin can LiveConnect be used in this way to read local files as well?
I didn't get it to read file:// URIs, I think there's some java.security.manager or java.lang.SecurityManager in the way. My java is a little rusty. Me not getting it to work does not mean it's impossible ;)

*But* here's the big news:
The bug triggers in applets. Confirmed with IE, Opera, Chrome, Firefox..
If you have this already compiled to an applet it'd be handy to upload the testcase.
Component: DOM → Java (Oracle)
Product: Core → Plugins
QA Contact: general → oracle-java
Summary: LiveConnect allows JavaScript to read arbitrary ZIP files across origins (including ODT files) → jar: allows Java to read arbitrary ZIP files across origins (including ODT files)
Whiteboard: cross-browser in applet form
Version: 13 Branch → unspecified
just wrap in applet tag. make width and height a few hundred pixels each..
Applet added. Oracle is going to be notified of this..
(In reply to Frederik Braun [:freddyb] from comment #7)
> Applet added. Oracle is going to be notified of this..

Did they respond or give you any kind of tracking number?
Sorry,

Tracking #:    S0191404
Description:   ORACLE JAVA JRE 7U5 SOP BYPASS FOR ZIP-BASED FILETYPES
Status:        Under investigation / Being fixed in main codeline
This is fixed with Java JRE 7 Update 9.
Resolved/Fixed?
My bad, I just worked through my Proof Of Concept again and it still works.
Status is still "Under investigation / Being fixed in main codeline" from Oracle's side.
Tracking #:    S0191404
Description:   ORACLE JAVA JRE 7U5 SOPBYPASS FOR ZIP-BASED FILETYPES
Status:        Issue fixed in main codeline, scheduled for a future CPU
Resolving fixed based on comment 10.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Will be fixed by Oracle update on conversation with Freddy.
Resolution: FIXED → WONTFIX
Group: core-security → core-security-release
Product: Plugins → Plugins Graveyard

Removing employee no longer with company from CC list of private bugs.

Group: core-security-release
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: