Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CVE-2019-9658: Gradle depends upon Checkstyle Version vulnerable to MITM based XXE #8792

Closed
JLLeitschuh opened this issue Mar 15, 2019 · 5 comments
Milestone

Comments

@JLLeitschuh
Copy link
Contributor

Gradle's checksyle plugin currently ships with a default dependenciy upon Checkstyle version 8.17.

public static final String DEFAULT_CHECKSTYLE_VERSION = "8.17";

Checkstyle versions below below 8.18 are vulnerable to XXE of the remotely loaded DTD file being MITMed.

https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-9658
https://nvd.nist.gov/vuln/detail/CVE-2019-9658

@big-guy
Copy link
Member

big-guy commented Mar 15, 2019

From checkstyle/checkstyle#6474, it looks like only <8.11 are definitely affected by default? IIUC, if you have custom configuration, you might be affected with 8.11-8.17.

From 8.11 version checkstyle do not rely on remove DTDs if you use standard config, with standard DTDs.

As of this writing,
Gradle 5.2.1 ships with Checkstyle 8.12
Gradle 5.3 RCs are using Checkstyle 8.17

@JLLeitschuh
Copy link
Contributor Author

Looking back at my notes on this research and the comments, yes, you are correct.

The reason I originally found this vulnerability requiring me to responsibility disclose it to the checkstyle team was that I found my build would fail due to checkstyle if I ran it in offline mode with the internet disconnected.

I originally setup checkstyle sometime in the Gradle 4.x series.

@britter britter added this to the 6.0 RC1 milestone Oct 9, 2019
@britter
Copy link
Member

britter commented Oct 9, 2019

Fixed in 1be126f

@britter britter closed this as completed Oct 9, 2019
@hstonec
Copy link

hstonec commented Oct 30, 2019

Hi, our team still uses Gradle 5.6.3 which seems that we cannot get this fix. Is it possible to also apply the fix to 5.6.3 ?

@JLLeitschuh
Copy link
Contributor Author

@hstonec Simply upgrade the version of CheckStyle that your build relies upon.

https://docs.gradle.org/current/dsl/org.gradle.api.plugins.quality.CheckstyleExtension.html#org.gradle.api.plugins.quality.CheckstyleExtension:toolVersion

checkstyle {
  toolVersion = ...
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants