CVE-2021-21361: Gradle vagrant plugin Gradle-vagrant-plugin Vulnerability
HIGHCVE-2021-21361 is a HIGH (CVSS 7.4) gradle-vagrant-plugin vulnerability (CWE-532: Insertion of Sensitive Information into Log File) affecting Gradle vagrant plugin libraries in the Maven ecosystem. The issue involves gradle-vagrant-plugin. Remediation is available by upgrading affected packages to version 3.0.0.
CVE-2021-21361 at a Glance
Security Impact
CVSS: 7.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N).
How to Fix CVE-2021-21361
To remediate this vulnerability, upgrade all affected Gradle vagrant plugin 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.bmuschko</groupId>
<artifactId>gradle-vagrant-plugin</artifactId>
<version>3.0.0</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.bmuschko
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2021-21361, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=com.bmuschko
Analyze the terminal output to locate any version of Gradle vagrant plugin in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.0.0), your application is affected.
Note: The mvn dependency:tree -Dincludes=com.bmuschko 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-532: Insertion of Sensitive Information into Log File, where the product writes sensitive information to a log file. In Gradle vagrant plugin, 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-2021-21361 Affected Gradle vagrant plugin Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
com.bmuschko:gradle-vagrant-plugin
|
Maven |
≥ 0.6
< 3.0.0
|
3.0.0
|
References
Frequently Asked Questions
What is CVE-2021-21361?
Which Gradle vagrant plugin versions are affected?
What version fixes CVE-2021-21361?
Is gradle-vagrant-plugin affected?
What is the CVSS score of CVE-2021-21361?
What CWE is associated with CVE-2021-21361?
How can I check Maven dependencies for CVE-2021-21361?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-jpcm-4485-69p7",
"modified" : "2021-03-12T17:32:39Z",
"published" : "2021-03-09T00:38:41Z",
"aliases" : [ "CVE-2021-21361" ],
"summary" : "Sensitive information disclosure via log in com.bmuschko:gradle-vagrant-plugin",
"details" : "### Impact\n\nThe `com.bmuschko:gradle-vagrant-plugin` Gradle plugin contains an information disclosure vulnerability due to the logging of the system environment variables.\n\nWhen this Gradle plugin is executed in public CI/CD, this can lead to sensitive credentials being exposed to malicious actors.\n\n### Patches\nFixed in version 3.0.0\n\n### References\n\n - https://github.com/bmuschko/gradle-vagrant-plugin/blob/292129f9343d00d391543fae06239e9b0f33db73/src/main/groovy/com/bmuschko/gradle/vagrant/process/GDKExternalProcessExecutor.groovy#L42-L44\n - https://github.com/bmuschko/gradle-vagrant-plugin/issues/19\n - https://github.com/bmuschko/gradle-vagrant-plugin/pull/20\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n* Open an issue in [bmuschko/gradle-vagrant-plugin](https://github.com/bmuschko/gradle-vagrant-plugin)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "com.bmuschko:gradle-vagrant-plugin"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.6"
}, {
"fixed" : "3.0.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/JLLeitschuh/security-research/security/advisories/GHSA-jpcm-4485-69p7"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-21361"
}, {
"type" : "WEB",
"url" : "https://github.com/bmuschko/gradle-vagrant-plugin/issues/19"
}, {
"type" : "WEB",
"url" : "https://github.com/bmuschko/gradle-vagrant-plugin/pull/20"
}, {
"type" : "WEB",
"url" : "https://github.com/bmuschko/gradle-vagrant-plugin/blob/292129f9343d00d391543fae06239e9b0f33db73/src/main/groovy/com/bmuschko/gradle/vagrant/process/GDKExternalProcessExecutor.groovy#L42-L44"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-532" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2021-03-09T00:38:15Z",
"nvd_published_at" : "2021-03-09T01:15:00Z"
}
}