Don’t open that XML: XXE to RCE in XML plugins for VS Code, Eclipse, Theia, …
The XML parsing library LSP4XML, used by several IDE plugins, was vulnerable to XML External Entity (XXE) injection. An attacker could exploit this by having a victim open a malicious XML file, leading to remote code execution.
shielder.com
Published on shielder.com
LSP4XML, the library used to parse XML files in VSCode-XML, Eclipse’s wildwebdeveloper, theia-xml and more, was affected by an XXE (CVE-2019-18213) which lead to RCE (CVE-2019-18212) exploitable by just opening a malicious XML file.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the XML parser was not configured to disable external entity resolution, allowing XXE.
Impact
An attacker could achieve remote code execution on the victim's machine by convincing them to open a malicious XML file in a vulnerable IDE plugin.
What the attacker needed
Victim opens a malicious XML file
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
XML files can include special instructions called 'entities' that tell the parser to fetch content from elsewhere. If the parser is not configured securely, it will follow those instructions, even fetching files from the victim's computer or making network requests. Here, that flaw allowed an attacker to run their own code on the victim's machine simply by getting them to open a crafted XML file.
What is XXE?
An XML parser resolves entities the attacker defines, reading local files or making the server send requests.