CVE-2021-2471 MySQL JDBC XXE
The getSource() method in MySQL Connector/J's MysqlSQLXML class did not check for external entities when parsing XML, allowing an attacker to craft XML that triggers XXE. This could lead to reading local files or making network requests from the server.
Prior to MySQL Connector/J 8.0.27, the getSource() method exists in MysqlSQLXML, but the getSource() method has no security check when external general entities included in XML sources, consequently, here exists a XXE vulnerability.
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 used in getSource() was not configured to disable external entity resolution, allowing external entities to be processed.
Impact
An attacker could exploit this to read local files or perform SSRF, though the text does not specify the exact impact.
What the attacker needed
Ability to supply XML to getSource()
The fix
The getSource() method was fixed to no longer support external DTD, external general entities, and external general parameters.
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 allows defining 'entities' that can reference external files or URLs. If a program parses XML without disabling these external references, an attacker can make the program read sensitive files or contact internal servers. This is called XXE (XML External Entity) injection.
What is XXE?
An XML parser resolves entities the attacker defines, reading local files or making the server send requests.