
Proof-of-concept demonstrating XXE vulnerability in JetBrains Ktor < 2.3.5 via XML ContentNegotiation, with prevention guidelines and OWASP-based analysis.
In JetBrains Ktor before 2.3.5 default configuration of ContentNegotiation with XML format was vulnerable to XXE.
The vulnerability was patched by @marychatte on Sep 29, 2023 (https://github.com/ktorio/ktor/pull/3770), the vulnerability was caused by a supply chain attack based on a misconfiguration in the external library xmlutil version 0.86.1.

Based on the OWASP guide (https://cheatsheetseries.owasp.org/cheatsheets/XML_External_Entity_Prevention_Cheat_Sheet.html#xmlinputfactory-a-stax-parser) , the fix is not comprehensive enough, I found a interesting answear here (https://security.stackexchange.com/questions/260956/java-xxe-vulnerability) : The main objective is to disable DTDs, it basically consists of the primary defense against this attack.
