CVE-2019-10782: Checkstyle XML External Entity (XXE) Processing Vulnerability
MODERATECVE-2019-10782 is a MODERATE (CVSS 5.3) xml external entity (xxe) processing vulnerability (CWE-611: Improper Restriction of XML External Entity Reference) affecting Checkstyle libraries in the Maven ecosystem. The issue involves xml external entity (xxe) processing ('external-parameter-entities' feature was not fully disabled)). Remediation is available by upgrading affected packages to version 8.29.
CVE-2019-10782 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N).
How to Fix CVE-2019-10782
To remediate this vulnerability, upgrade all affected Checkstyle dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>8.29</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=com.puppycrawl.tools
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2019-10782, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=com.puppycrawl.tools
Analyze the terminal output to locate any version of Checkstyle in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 8.29), your application is affected.
Note: The mvn dependency:tree -Dincludes=com.puppycrawl.tools command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-611: Improper Restriction of XML External Entity Reference, where the product processes an xml document that can contain xml entities with uris that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output. In Checkstyle, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2019-10782 Affected Checkstyle Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
com.puppycrawl.tools:checkstyle
|
Maven |
< 8.29
|
8.29
|
References
Frequently Asked Questions
What is CVE-2019-10782?
Which Checkstyle versions are affected?
What version fixes CVE-2019-10782?
Is checkstyle affected?
What is the CVSS score of CVE-2019-10782?
What CWE is associated with CVE-2019-10782?
How can I check Maven dependencies for CVE-2019-10782?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-763g-fqq7-48wg",
"modified" : "2021-08-19T16:49:30Z",
"published" : "2020-01-31T18:00:07Z",
"aliases" : [ "CVE-2019-10782" ],
"summary" : "XML external entity (XXE) processing ('external-parameter-entities' feature was not fully disabled))",
"details" : "Due to an incomplete fix for [CVE-2019-9658](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-9658), checkstyle was still vulnerable to XML External Entity (XXE) Processing.\n\n### Impact\n\n#### User: Build Maintainers\n\nThis vulnerability probably doesn't impact Maven/Gradle users as, in most cases, these builds are processing files that are trusted, or pre-vetted by a pull request reviewer before being run on internal CI infrastructure.\n\n#### User: Static Analysis as a Service\n\nIf you operate a site/service that parses \"untrusted\" Checkstyle XML configuration files, you are vulnerable to this and should patch.\n\nNote from the discoverer of the original CVE-2019-9658:\n\n> While looking at a few companies that run Checkstyle/PMD/ect... as a service I notice that it's a common pattern to run the static code analysis tool inside of a Docker container with the following flags:\n> ```\n> --net=none \\\n> --privileged=false \\\n> --cap-drop=ALL\n> ```\n> Running the analysis in Docker has the advantage that there should be no sensitive local file information that XXE can exfiltrate from the container. Additionally, these flags prevent vulnerabilities in static analysis tools like Checkstyle from being used to exfiltrate data via XXE or to perform SSRF.\n> \\- [Jonathan Leitschuh](https://twitter.com/jlleitschuh)\n\n### Patches\n_Has the problem been patched? What versions should users upgrade to?_\n\nPatched, will be released with version 8.29 at 26 Jan 2020.\n\n### Workarounds\n_Is there a way for users to fix or remediate the vulnerability without upgrading?_\n\nNo workaround are available\n\n### References\n\n - [CWE-611: Improper Restriction of XML External Entity Reference](https://cwe.mitre.org/data/definitions/611.html)\n - GitHub Issue https://github.com/checkstyle/checkstyle/issues/7468\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n* Open an issue in https://github.com/checkstyle/checkstyle/issues\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "com.puppycrawl.tools:checkstyle"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "8.29"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/checkstyle/checkstyle/security/advisories/GHSA-763g-fqq7-48wg"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-10782"
}, {
"type" : "WEB",
"url" : "https://github.com/checkstyle/checkstyle/issues/7468"
}, {
"type" : "WEB",
"url" : "https://github.com/checkstyle/checkstyle/commit/c46a16d177e6797895b195c288ae9a9a096254b8"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/r8aaf4ee16bbaf6204731d4770d96ebb34b258cd79b491f9cdd7f2540@%3Ccommits.nifi.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2020/02/msg00008.html"
}, {
"type" : "WEB",
"url" : "https://snyk.io/vuln/SNYK-JAVA-COMPUPPYCRAWLTOOLS-543266"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-611" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2020-01-31T17:58:17Z",
"nvd_published_at" : null
}
}