"Billion Laughs" is a classic DoS attack against XML by nesting entities. Think ...
hanno @hanno@mastodon.social
"Billion Laughs" is a classic DoS attack against XML by nesting entities. Think of something like you define &a; is a string, then &b; is 10 times &a;, &c; is 10 times &b; etc. If an XML parser naively resolves these, it may use excessive amounts of memory, crash, or take forever.
This is an inherent flaw in the XML spec, which is one of many reasons why XML is bad. Parsers have various unsatisfying workarounds by limiting things. I noted that, regularly, new variations of this flaw show up 🧵