CVE-2021-21361: Gradle vagrant plugin Gradle-vagrant-plugin Vulnerability

HIGH
Advisory Identifier: GHSA-jpcm-4485-69p7
CVSS 7.4
CWE-532
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2021-21361
GHSA Identifier GHSA-jpcm-4485-69p7
Severity HIGH
CVSS v3.1 Base Score 7.4
CWE Classification CWE-532: Insertion of Sensitive Information into Log File
Affected Product Gradle vagrant plugin
Package Ecosystem Maven
Published Date
Last Updated

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).

Attack Vector Adjacent (AV:A)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (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.

com.bmuschko:gradle-vagrant-plugin fixed: 3.0.0
<dependency>
    <groupId>com.bmuschko</groupId>
    <artifactId>gradle-vagrant-plugin</artifactId>
    <version>3.0.0</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.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

### Impact The `com.bmuschko:gradle-vagrant-plugin` Gradle plugin contains an information disclosure vulnerability due to the logging of the system environment variables. When this Gradle plugin is executed in public CI/CD, this can lead to sensitive credentials being exposed to malicious actors. ### Patches Fixed in version 3.0.0 ### References - https://github.com/bmuschko/gradle-vagrant-plugin/blob/292129f9343d00d391543fae06239e9b0f33db73/src/main/groovy/com/bmuschko/gradle/vagrant/process/GDKExternalProcessExecutor.groovy#L42-L44 - https://github.com/bmuschko/gradle-vagrant-plugin/issues/19 - https://github.com/bmuschko/gradle-vagrant-plugin/pull/20 ### For more information If you have any questions or comments about this advisory: * Open an issue in [bmuschko/gradle-vagrant-plugin](https://github.com/bmuschko/gradle-vagrant-plugin)

CVE-2021-21361 Affected Gradle vagrant plugin Versions

1 component(s)
Fixed Versions:
3.0.0
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?
CVE-2021-21361 is a security vulnerability in Gradle vagrant plugin involving gradle-vagrant-plugin under CWE-532: Insertion of Sensitive Information into Log File.
Which Gradle vagrant plugin versions are affected?
Affected versions include releases prior to 3.0.0 across affected packages: com.bmuschko:gradle-vagrant-plugin.
What version fixes CVE-2021-21361?
Upgrading to 3.0.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is gradle-vagrant-plugin affected?
Yes, com.bmuschko:gradle-vagrant-plugin is affected in releases prior to 3.0.0. Upgrade your dependency to 3.0.0 or later.
What is the CVSS score of CVE-2021-21361?
CVE-2021-21361 has a CVSS v3.1 base score of 7.4 (HIGH) with vector string CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N.
What CWE is associated with CVE-2021-21361?
CVE-2021-21361 is classified under CWE-532: Insertion of Sensitive Information into Log File (The product writes sensitive information to a log file.).
How can I check Maven dependencies for CVE-2021-21361?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=com.bmuschko'. 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-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"
  }
}