-
Notifications
You must be signed in to change notification settings - Fork 539
SweetXml inline DTD vulnerability #781
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
Comments
Sounds good, thanks @dbernheisel. I'll keep an eye out for the release. |
SweetXml 0.7.0 is released (0.7.1 even): https://github.com/kbrw/sweet_xml/blob/master/CHANGELOG.md |
Thanks @andrevdm - I've bumped the minimum version in mix.exs |
Just want to point out that using the newer version doesn't cover the issue, I think you'd have to specify options as well to avoid DTD bombing. |
Ah, dang, thanks @dbernheisel. I get it now. Just give me a moment here :) |
There we go, that should do it cf5dbcb#diff-cc3c9ea16b7b52b9ec61704993ac4e46bd0d6403262214c48635973cd903757d |
Environment
Current behavior
There is a possibility of an attack via XML parsing. Trusted sources such as AWS responses may not be a high risk, but I'm unaware of this parser is used for any user-sourced XML. Either way it may be prudent to limit DTD parsing to known sources or to ignore DTD.
Relevant issue in SweetXML: kbrw/sweet_xml#71
Expected behavior
The proposed fix from SweetXML is not yet released. It may be released in v0.7.0 after testing. (0.6.6 is the current version at this time).
When it's released, it may be good for ./lib/ex_aws/operation/query/parser.ex to explicitly parse the response XML and turn off DTD parsing, instead of implicitly parsing via
xpath/2
. Currently ExAws callsSweetXml.xpath
which does not offer passing through options to parse (that I see anyway)For example with SweetXML on
v0.7.0-rc.1
:This should avoid DTD bombing from Amazon :)
The text was updated successfully, but these errors were encountered: