CVE-2019-9658: Checkstyle Checkstyle Vulnerability

MODERATE
Advisory Identifier: GHSA-gp32-7h29-rpxm
CVSS 5.3
CWE-611
Published
Advisory Summary

CVE-2019-9658 is a MODERATE (CVSS 5.3) checkstyle vulnerability (CWE-611: Improper Restriction of XML External Entity Reference) affecting Checkstyle libraries in the Maven ecosystem. The issue involves checkstyle. Remediation is available by upgrading affected packages to version 8.18.

CVE-2019-9658 at a Glance

CVE Identifier CVE-2019-9658
GHSA Identifier GHSA-gp32-7h29-rpxm
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-611: Improper Restriction of XML External Entity Reference
Affected Product Checkstyle
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2019-9658

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.

com.puppycrawl.tools:checkstyle fixed: 8.18
<dependency>
    <groupId>com.puppycrawl.tools</groupId>
    <artifactId>checkstyle</artifactId>
    <version>8.18</version>
</dependency>
Verify Direct and Transitive Dependencies

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-9658, 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.18), 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

Checkstyle prior to 8.18 loads external DTDs by default, which can potentially lead to denial of service attacks or the leaking of confidential information.

CVE-2019-9658 Affected Checkstyle Versions

1 component(s)
Fixed Versions:
8.18
Product / Package Ecosystem Affected Versions Fixed Version
com.puppycrawl.tools:checkstyle
Maven
< 8.18
8.18

References

NVD — CVE-2019-9658 NVD
https://nvd.nist.gov/vuln/detail/CVE-2019-9658
Checkstyle Source Repository REPOSITORY
https://github.com/checkstyle/checkstyle/issues/6474
Checkstyle Source Repository REPOSITORY
https://github.com/checkstyle/checkstyle/issues/6478
Checkstyle Source Repository REPOSITORY
https://github.com/checkstyle/checkstyle/pull/6476
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VJPT54USMGWT3Y6XVXLDEHKRUY2EI4OE
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/AEYBAHYAV37WHMOXZYM2ZWF46FHON6YC
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/2BMOPJ2XYE4LB2HM7OMSUBBIYEDUTLWE
lists.debian.org/debian-lts-announce... WEB
https://lists.debian.org/debian-lts-announce/2019/04/msg00029.html
lists.apache.org/thread.html/rda9959... WEB
https://lists.apache.org/thread.html/rda99599896c3667f2cc9e9d34c7b6ef5d2bbed1f4801e1d75a2b0679@%3Ccommits.nifi.apache.org%3E
lists.apache.org/thread.html/fff26ee... WEB
https://lists.apache.org/thread.html/fff26ee7b59360a0264fef4e8ed9454ef652db2c39f2892a9ea1c9cb@%3Cnotifications.fluo.apache.org%3E
lists.apache.org/thread.html/a35a8cc... WEB
https://lists.apache.org/thread.html/a35a8ccb316d4c2340710f610cba8058e87d5376259b35ef3ed2bf89@%3Cnotifications.accumulo.apache.org%3E
lists.apache.org/thread.html/9942214... WEB
https://lists.apache.org/thread.html/994221405e940e148adcfd9cb24ffc6700bed70c7820c55a22559d26@%3Cnotifications.fluo.apache.org%3E
lists.apache.org/thread.html/7eea10e... WEB
https://lists.apache.org/thread.html/7eea10e7be4c21060cb1e79f6524c6e6559ba833b1465cd2870a56b9@%3Cserver-dev.james.apache.org%3E
lists.apache.org/thread.html/6bf8bbb... WEB
https://lists.apache.org/thread.html/6bf8bbbca826e883f09ba40bc0d319350e1d6d4cf4df7c9e399b2699@%3Ccommits.fluo.apache.org%3E
Checkstyle Source Repository REPOSITORY
https://github.com/checkstyle/checkstyle
GitHub Advisory / Wiki ADVISORY
https://github.com/advisories/GHSA-gp32-7h29-rpxm
Checkstyle Release RELEASE
https://checkstyle.org/releasenotes.html#Release_8.18

Frequently Asked Questions

What is CVE-2019-9658?
CVE-2019-9658 is a security vulnerability in Checkstyle involving checkstyle under CWE-611: Improper Restriction of XML External Entity Reference.
Which Checkstyle versions are affected?
Affected versions include releases prior to 8.18 across affected packages: com.puppycrawl.tools:checkstyle.
What version fixes CVE-2019-9658?
Upgrading to 8.18 (or the latest patched release for your respective branch) resolves the vulnerability.
Is checkstyle affected?
Yes, com.puppycrawl.tools:checkstyle is affected in releases prior to 8.18. Upgrade your dependency to 8.18 or later.
What is the CVSS score of CVE-2019-9658?
CVE-2019-9658 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2019-9658?
CVE-2019-9658 is classified under CWE-611: Improper Restriction of XML External Entity Reference (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.).
How can I check Maven dependencies for CVE-2019-9658?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=com.puppycrawl.tools'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-gp32-7h29-rpxm",
  "modified" : "2021-09-13T12:37:35Z",
  "published" : "2019-03-14T15:39:14Z",
  "aliases" : [ "CVE-2019-9658" ],
  "summary" : "Moderate severity vulnerability that affects com.puppycrawl.tools:checkstyle",
  "details" : "Checkstyle prior to 8.18 loads external DTDs by default, which can potentially lead to denial of service attacks or the leaking of confidential information.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/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.18"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-9658"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/checkstyle/checkstyle/issues/6474"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/checkstyle/checkstyle/issues/6478"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/checkstyle/checkstyle/pull/6476"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VJPT54USMGWT3Y6XVXLDEHKRUY2EI4OE"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/AEYBAHYAV37WHMOXZYM2ZWF46FHON6YC"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/2BMOPJ2XYE4LB2HM7OMSUBBIYEDUTLWE"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2019/04/msg00029.html"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/rda99599896c3667f2cc9e9d34c7b6ef5d2bbed1f4801e1d75a2b0679@%3Ccommits.nifi.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/fff26ee7b59360a0264fef4e8ed9454ef652db2c39f2892a9ea1c9cb@%3Cnotifications.fluo.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/a35a8ccb316d4c2340710f610cba8058e87d5376259b35ef3ed2bf89@%3Cnotifications.accumulo.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/994221405e940e148adcfd9cb24ffc6700bed70c7820c55a22559d26@%3Cnotifications.fluo.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/7eea10e7be4c21060cb1e79f6524c6e6559ba833b1465cd2870a56b9@%3Cserver-dev.james.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/6bf8bbbca826e883f09ba40bc0d319350e1d6d4cf4df7c9e399b2699@%3Ccommits.fluo.apache.org%3E"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/checkstyle/checkstyle"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-gp32-7h29-rpxm"
  }, {
    "type" : "WEB",
    "url" : "https://checkstyle.org/releasenotes.html#Release_8.18"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-611" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T21:37:44Z",
    "nvd_published_at" : null
  }
}