GHSA-6vjm-54vp-mxhx: Github.com/juju/juju Juju's Unprivileged User Running On Vulnerability

HIGH
CVSS 8.8
CWE-284 CWE-269 CWE-209
Published
Advisory Summary

GHSA-6vjm-54vp-mxhx is a HIGH (CVSS 8.8) juju's unprivileged user running on vulnerability (CWE-284: Improper Access Control) affecting Github.com/juju/juju libraries in the Go ecosystem. The issue involves juju's unprivileged user running on charm node can leak any secret or relation data accessible to the local charm. Remediation is available by upgrading affected packages to version 2.9.50, 3.1.9, 3.3.6, 3.4.5, 3.5.3.

GHSA-6vjm-54vp-mxhx at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-6vjm-54vp-mxhx
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-284: Improper Access Control
Affected Product Github.com/juju/juju
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 8.8

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

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix GHSA-6vjm-54vp-mxhx

To remediate this vulnerability, upgrade all affected Github.com/juju/juju dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/juju/juju fixed: 2.9.50
Upgrade github.com/juju/juju to 2.9.50
github.com/juju/juju fixed: 3.1.9
Upgrade github.com/juju/juju to 3.1.9
github.com/juju/juju fixed: 3.3.6
Upgrade github.com/juju/juju to 3.3.6
github.com/juju/juju fixed: 3.4.5
Upgrade github.com/juju/juju to 3.4.5
github.com/juju/juju fixed: 3.5.3
Upgrade github.com/juju/juju to 3.5.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/juju/juju

How to Check if You Are Affected

To determine whether your application is affected by GHSA-6vjm-54vp-mxhx, inspect your project dependencies for Github.com/juju/juju:

inspect dependencies for github.com/juju/juju

Analyze the terminal output to locate any version of Github.com/juju/juju in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.9.50), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-284: Improper Access Control, where the product does not restrict or incorrectly restricts access to a resource from an unauthorized actor. In Github.com/juju/juju, 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

An issue was discovered in Juju that resulted in the leak of the sensitive context ID, which allows a local unprivileged attacker to access other sensitive data or relation accessible to the local charm. A potential exploit where a user can run a bash loop attempting to execute hook tools. If running while another hook is executing, we log an error with the context ID, making it possible for the user to then use that ID in a following call successfully. This means an unprivileged user can access anything available via a hook tool such as config, relation data and secrets.

GHSA-6vjm-54vp-mxhx Affected Github.com/juju/juju Versions

5 component(s)
Fixed Versions:
2.9.503.1.93.3.63.4.53.5.3
Product / Package Ecosystem Affected Versions Fixed Version
github.com/juju/juju
Go
< 2.9.50
2.9.50
github.com/juju/juju
Go
≥ 3.0.0
< 3.1.9
3.1.9
github.com/juju/juju
Go
≥ 3.2.0
< 3.3.6
3.3.6
github.com/juju/juju
Go
≥ 3.4.0
< 3.4.5
3.4.5
github.com/juju/juju
Go
≥ 3.5.0
< 3.5.3
3.5.3

References

Frequently Asked Questions

What is GHSA-6vjm-54vp-mxhx?
GHSA-6vjm-54vp-mxhx is a security vulnerability in Github.com/juju/juju involving Juju's unprivileged user running on charm node can leak any secret or relation data accessible to the local charm under CWE-284: Improper Access Control.
Which Github.com/juju/juju versions are affected?
Affected versions include releases prior to 2.9.50, 3.1.9, 3.3.6, 3.4.5, 3.5.3 across affected packages: github.com/juju/juju.
What version fixes GHSA-6vjm-54vp-mxhx?
Upgrading to 2.9.50, 3.1.9, 3.3.6, 3.4.5, 3.5.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/juju/juju affected?
Yes, github.com/juju/juju is affected in releases prior to 2.9.50, 3.1.9, 3.3.6, 3.4.5, 3.5.3. Upgrade your dependency to 2.9.50, 3.1.9, 3.3.6, 3.4.5, 3.5.3 or later.
What is the CVSS score of GHSA-6vjm-54vp-mxhx?
GHSA-6vjm-54vp-mxhx has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H.
What CWE is associated with GHSA-6vjm-54vp-mxhx?
GHSA-6vjm-54vp-mxhx is classified under CWE-284: Improper Access Control (The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor.).
How can I check Go dependencies for GHSA-6vjm-54vp-mxhx?
Run the dependency tree command: 'inspect dependencies for github.com/juju/juju'. 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-6vjm-54vp-mxhx",
  "modified" : "2024-08-07T14:13:30Z",
  "published" : "2024-08-05T17:19:11Z",
  "aliases" : [ ],
  "summary" : "Juju's unprivileged user running on charm node can leak any secret or relation data accessible to the local charm",
  "details" : "An issue was discovered in Juju that resulted in the leak of the sensitive context ID, which allows a local unprivileged attacker to access other sensitive data or relation accessible to the local charm. A potential exploit where a user can run a bash loop attempting to execute hook tools. If running while another hook is executing, we log an error with the context ID, making it possible for the user to then use that ID in a following call successfully. This means an unprivileged user can access anything available via a hook tool such as config, relation data and secrets.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/juju/juju"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.9.50"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/juju/juju"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.1.9"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/juju/juju"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.2.0"
      }, {
        "fixed" : "3.3.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/juju/juju"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.4.0"
      }, {
        "fixed" : "3.4.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/juju/juju"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.5.0"
      }, {
        "fixed" : "3.5.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/juju/juju/security/advisories/GHSA-6vjm-54vp-mxhx"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-6984"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/juju/juju/commit/da929676853092a29ddf8d589468cf85ba3efaf2"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/juju/juju"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2024-3010"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2024-3040"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-209", "CWE-269", "CWE-284" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-08-05T17:19:11Z",
    "nvd_published_at" : null
  }
}