Bug 63899 - xxe vulnerability
Summary: xxe vulnerability
Status: RESOLVED INVALID
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: 4.1.0-FINAL
Hardware: PC Mac OS X 10.1
: P2 blocker (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-01 18:21 UTC by Santosh Pandey
Modified: 2019-11-16 16:54 UTC (History)
0 users



Attachments
pw: test123 (35.29 KB, application/x-7z-compressed)
2019-11-01 18:21 UTC, Santosh Pandey
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Santosh Pandey 2019-11-01 18:21:26 UTC
Created attachment 36868 [details]
pw: test123

Apache POI's latest version 4.1.1 is still vulnerable to XXE vulnerability while uploading the XLSX file.
An XXE attack can be made by adding Doc Type declaration in the sharedStrings.xml file. Current implements block vulnerability if it is injected in all other XML files but doesn't when added in sharedStrings.xml file.
Please do the needful.
The vulnerable file is attached.
Comment 1 PJ Fanning 2019-11-01 20:09:27 UTC
That DTD is benign.

If you use XSSFWorkbook, XMLBeans is used to load the sharedstrings.xml.

XMLBeans can be configured to control some of the XML Parser behaviours (org.apache.poi.ooxml.POIXMLTypeLoader.DEFAULT_XML_OPTIONS).

The XML parser secure processing flags are enabled by default so malicious DTDs should be rejected.
Comment 2 Dominik Stadler 2019-11-02 05:52:28 UTC
Please follow the security reporting guidelines for Apache projects described at https://www.apache.org/security/, i.e. ideally the report is sent to a mailing list only at first to not make any potential security issue publicly available immediately.

Also please include code to show the problem that you see, as it seems we cannot reproduce the described behavior just off of the xlsx file. Especially what do you mean with "uploading" and which code is used to demonstrate the problem.
Comment 3 Santosh Pandey 2019-11-02 06:07:32 UTC
Ok Sorry, sending issue on email list, closing this here
Comment 4 Santosh Pandey 2019-11-02 06:09:36 UTC
You can delete this bug