-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XXE Injection - Security scan bypass #771
Comments
Thanks for highlighting this issue. I've been reading up on UTF-7, and understand how this works, and am looking to the most efficient solution that I can find for handling charsets like UTF-7 |
Hey @MarkBaker, Would it be possible for the [1] http://php.net/manual/en/function.libxml-disable-entity-loader.php |
|
Looking more closely |
Initial work done on |
Fixed in version 1.5.1 |
Thank you for the fix! I was unable to find a bypass around the new checks. |
Thanks for alerting us to the vulnerability; although I would have preferred an email with the details, rather than posting an actual example publicly here, and an email would have triggered my attention sooner. |
My apologies. I was unable to find a contact email or website for the project, which is why I submitted the bug through here. I will keep that in mind if I come across any issues in the future. |
This is:
What is the expected behavior?
The securityScan() function is used to prevent XXE attacks.
What is the current behavior?
The securityScan() function can be bypassed by using UTF-7 encoding.
What are the steps to reproduce?
/Details suppressed until after patch was released/
Replace the IP address and port
127.0.0.1:8080
with something you control.sheet1.xml
Replace
sheet1.xml
in your xlsx file with the one above and re-zip the excel sheet. I've attached an xlsx file that makes a request as configured above.File exploit-localhost.xlsx
Set up a listener either with Python, netcat, etc. locally and watch for a request that will be made once the xlsx is read by the library.
Please let me know if you would like more details on generating the xlsx file or if you need any clarification about the issue.
Which versions of PhpSpreadsheet and PHP are affected?
I believe it affects all versions.
The text was updated successfully, but these errors were encountered: