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 triggered by outdated plexus-utils #1

Closed
binkley opened this issue Aug 28, 2021 · 9 comments
Closed

CVE triggered by outdated plexus-utils #1

binkley opened this issue Aug 28, 2021 · 9 comments

Comments

@binkley
Copy link

binkley commented Aug 28, 2021

CVE scanning by the DependencyCheck plugin detects an outdated, insecure dependency on plexus-utils, so fails my build.

Removing Modernizer plugin from my build fixes this passes CVS scanning.

I can get around it for now with this in build.gradle:

configurations.modernizer {
    exclude group: "org.codehaus.plexus", module: "plexus-utils"
}

I was not able to track down the transitive dependency on plexus-utils, but gradle clean build passes after this exclusion when using DependencyCheck and Modernizer together.

@gaul
Copy link

gaul commented Aug 28, 2021

I think this is caused by modernizer-maven-plugin 2.3.0 use of maven-project 2.0.9. 2.4.0-SNAPSHOT recently upgraded to 2.2.1 (which is still over 10 years old). Could you try overriding this dependency?

@binkley
Copy link
Author

binkley commented Aug 28, 2021

What I did was exclude plexus-utils altogether. There may be something needed, but for me no ill effects resulted.

@binkley
Copy link
Author

binkley commented Aug 28, 2021

I do note a lot of outdated dependencies for the Maven plugin. I'll drop an issue on that project to note this.

binkley pushed a commit to binkley/modernizer-maven-plugin that referenced this issue Aug 28, 2021
The `plexus-utils` dependency is upstream in this project, and triggers
a CVE for XML injection.  I was unable to find ill effect from expluding
`plexus-utils` as a transitive dependency.

See https://nvd.nist.gov/vuln/detail/CVE-2017-1000487
gaul pushed a commit to gaul/modernizer-maven-plugin that referenced this issue Aug 28, 2021
The plexus-utils dependency is upstream in this project, and triggers
a CVE for XML injection.  I was unable to find ill effect from excluding
plexus-utils as a transitive dependency.

See https://nvd.nist.gov/vuln/detail/CVE-2017-1000487

Fixes andygoossens/gradle-modernizer-plugin#1.  References #131.

Co-authored-by: Brian Oxley <boxley@thoughtworks.com>
@binkley
Copy link
Author

binkley commented Aug 28, 2021

To clarify for this Issue, the CVE is https://nvd.nist.gov/vuln/detail/CVE-2017-1000487

@andygoossens
Copy link
Owner

Thanks for your report.

I will create a new release of the Gradle plugin soon after the Maven plugin sees a new release. But if I am late to do so (or people want to upgrade even faster 😄), then you can already switch to a later version of the Maven plugin by providing another toolVersion like so:

modernizer {
  toolVersion = "..." // e.g. "2.4.0", assuming it keeps the same API
}

While excluding plexus-utils does not seem to do any harm, another workaround would be to upgrade plexus-utils to a non-vulnerable version:

dependencies {
  modernizer 'org.gaul:modernizer-maven-plugin:2.3.0'
  modernizer 'org.codehaus.plexus:plexus-utils:3.4.1'
}

These dependencies would override whatever the default dependency is that the Gradle plugin uses. (Usually "org.gaul:modernizer-maven-plugin:$toolVersion")

@binkley
Copy link
Author

binkley commented Jan 14, 2022

Hi, updating this issue ... it's been a while 😀

My sample is a Gradle project using modernizer 1.6.1.
To keep DependencyCheck from failing my build, I still have this in my build.gradle:

// TODO: Work around GitHub issue #92.  <-- Refers to an issue in my repo, no Modernizer
configurations.modernizer {
    exclude group: "org.codehaus.plexus", module: "plexus-utils"
}

I'm switching to your suggestion for dependencies. Is this a change you can put into the plugin?
My sample project is used to showcase to other devs best practices, and this is something I'd like to not explain when they clone my project as a starter.

@andygoossens
Copy link
Owner

I was waiting for a new modernizer-maven-plugin release but there was none since the issue got fixed on their end. I don't want to rush @gaul either as there seems to be no way to be affected by this security issue, and nothing else looks urgent enough to create another release of his plugin.

Moments ago, I committed a change that excludes the "plexus-utils" dependency from gradle-modernizer-plugin. (Similar to the code in your repository.)

I verified the change with "org.owasp.dependencycheck" and it no longer displays a CVE warning.

Enjoy the new 1.6.2 release. :-)

@gaul
Copy link

gaul commented Mar 6, 2022

@binkley
Copy link
Author

binkley commented Mar 9, 2022

This works great now -- thank you! 💯

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

3 participants