Improper Restriction of XML External Entity Reference in DiffPlug Spotless
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| com.diffplug.spotless:spotless-plugin-gradle Maven |
|
|
| com.diffplug.spotless:spotless-maven-plugin Maven |
|
|
| Product | Affected | Fixed in |
|---|---|---|
| com.diffplug.spotless:spotless-plugin-gradle Maven |
|
|
| com.diffplug.spotless:spotless-maven-plugin Maven |
|
|
In DiffPlug Spotless before 1.20.0 (library and Maven plugin) and before 3.20.0 (Gradle plugin), the XML parser would resolve external entities over both HTTP and HTTPS and didn't respect the resolveExternalEntities setting. For example, this allows disclosure of file contents to a MITM attacker if a victim performs a spotlessApply operation on an untrusted XML file.
From the CVE record · mitre
The XML parser in affected DiffPlug Spotless versions resolves external entities over HTTP and HTTPS even when the resolveExternalEntities setting is disabled. A man-in-the-middle attacker can obtain file contents if a victim runs spotlessApply on an untrusted XML file.
Check installations of the Spotless library and Maven plugin before 1.20.0, and the Gradle plugin before 3.20.0.