Live data from Hacker News

XML flaws threaten 'enormous' array of apps

theregister.co.uk

1–10 of 18 posts

Re: XML flaws threaten 'enormous' array of apps

#7
Poorly written XML parsers (and I've written my fair share) are always open to DOS attacks; XML has no upper bound on element names, attribute value length, stack depth ...

http://en.wikipedia.org/wiki/Billion_laughs

Same is mostly true of JSON parsers as well of course.

If you let potentially hostile users feed arbitrary data into any of these, even a totally non-buggy, perfectly conformant parser is wide-open to being abused via DOS.

Re: XML flaws threaten 'enormous' array of apps

#8
post #7

Poorly written XML parsers (and I've written my fair share) are always open to DOS attacks; XML has no upper bound on element names, attribute value length, stack depth ... http://en.wikipedia.org/wiki/Billion_laughs Same is mostly true of JSON parsers as well of course. If you let potentially hostile users feed arbitrary data into any of these, even a totally non-buggy, perfectly conformant parser is wide-open to be…

That's a nasty little xml document. Interesting how any kind of simple macro expansion system is wide open to this kind of attack.

My guess is that to distinguish between 'legitimate' cases and 'attacks' is on par with solving the halting problem.

Re: XML flaws threaten 'enormous' array of apps

#10
post #7

Poorly written XML parsers (and I've written my fair share) are always open to DOS attacks; XML has no upper bound on element names, attribute value length, stack depth ... http://en.wikipedia.org/wiki/Billion_laughs Same is mostly true of JSON parsers as well of course. If you let potentially hostile users feed arbitrary data into any of these, even a totally non-buggy, perfectly conformant parser is wide-open to be…

Somehow I'm surprised that XML/JSON libraries written since the 90s would have the same core flaw as string libraries written in the 70s.

I know I shouldn't be. But here I am, surprised.

Post reply on HN