Skip to content
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 Vulnerability due to simple-xml? #30

Open
mpretzer opened this issue Nov 27, 2019 · 4 comments
Open

XXE Vulnerability due to simple-xml? #30

mpretzer opened this issue Nov 27, 2019 · 4 comments

Comments

@mpretzer
Copy link

Accoding to ngallagher/simplexml#18 there is an XXE vulnerability in simple-xml, which is used by cups4j.

So in my understanding, a malicious printer or MITM could exploit cup4j Users.

Can you clarify on the subject? Does cups4j mitigate against such attacks by controlling the underlying XML Parsers, as is for example implemented in https://github.com/carrotsearch/simplexml-safe?

@mpretzer
Copy link
Author

No comment?

@harwey
Copy link
Owner

harwey commented Dec 16, 2019

Puh, sorry, I do not have very much free time to spend on Cups4j.
Cups4j uses plain simple-xml. I need to dive into this more to be able to answer your question properly. I won't be able to check this out in the next few days.

@mpretzer
Copy link
Author

mpretzer commented Feb 6, 2020

I had a quick look into cups4j. Apparently, simple-xml is only used to parse configuration files supplied by cups4j itself, loaded via classpath.
So XXE is not possible, unless the attacker controls the classpath.

However, given the lack of feedback from the author of simple-xml, I'd suggest to ditch that library in favor of jaxb or maybe jackson. At least, consider switching to the fork in https://github.com/carrotsearch/simplexml-safe

@gmuth
Copy link

gmuth commented Nov 5, 2020

I think the reason why xml is used is because the code is based on old "ch.ethz" code that was created when xml was hyped. there is actually no need to use xml in the first place. ipp is binary encoded and a decent object representation can be created without intermediate xml representations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants