CVE-2019-9843 Improper Restriction of XML External Entity Reference in DiffPlug Spotless

High 7.5 Published Updated

An attacker can disclose file contents to a MITM attacker if a victim processes an untrusted XML file using the Spotless library.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2019-9843?

CVE-2019-9843 is a high-severity vulnerability in n/a, published on 15 Mar 2019. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

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.

Weakness: CWE-611

Which versions are affected by CVE-2019-9843?

4 open source packages ship an affected version, including com.diffplug.spotless:spotless-maven-plugin and com.diffplug.spotless:spotless-plugin-gradle. It affects 2 products.

PackageAffectedFixed in
com.diffplug.spotless:spotless-maven-plugin MavenAll versions1.20.0
com.diffplug.spotless:spotless-maven-plugin MavenAll versions1.20.0
com.diffplug.spotless:spotless-plugin-gradle MavenAll versions3.20.0
com.diffplug.spotless:spotless-plugin-gradle MavenAll versions3.20.0

Products include Diffplug Gradle, Diffplug Maven.

How do I fix CVE-2019-9843?

Upgrade com.diffplug.spotless:spotless-maven-plugin to 1.20.0 or later.

Is CVE-2019-9843 being exploited?

There is no known exploitation of CVE-2019-9843 in the wild and no public exploit code.

Sources

Also known as GHSA-7v35-qwwj-p98g.

Is CVE-2019-9843 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free