CVE-2024-8037: Github.com/juju/juju Vulnerable Juju Hook Tool Abstract Vulnerability

MODERATE
Advisory Identifier: GHSA-8v4w-f4r9-7h6x
CVSS 6.5
CWE-284
Published
Advisory Summary

CVE-2024-8037 is a MODERATE (CVSS 6.5) vulnerable juju hook tool abstract vulnerability (CWE-284: Improper Access Control) affecting Github.com/juju/juju libraries in the Go ecosystem. The issue involves vulnerable juju hook tool abstract unix domain socket. Remediation is available by upgrading affected packages to version 0.0.0-20240820065804-2f2ec128ef5a.

CVE-2024-8037 at a Glance

CVE Identifier CVE-2024-8037
GHSA Identifier GHSA-8v4w-f4r9-7h6x
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-284: Improper Access Control
Affected Product Github.com/juju/juju
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 6.5

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

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

How to Fix CVE-2024-8037

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: 0.0.0-20240820065804-2f2ec128ef5a
Upgrade github.com/juju/juju to 0.0.0-20240820065804-2f2ec128ef5a
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 CVE-2024-8037, 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 0.0.0-20240820065804-2f2ec128ef5a), 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

### Impact When combined with an attack of `JUJU_CONTEXT_ID`, any user on the local system with access to the default network namespace may connect to the `@/var/lib/juju/agents/unit-xxxx-yyyy/agent.socket` and perform actions that are normally reserved to a juju charm. ### Patches Patch: https://github.com/juju/juju/commit/2f2ec128ef5a8ca81fc86ae79cfcdbab0007c206 Patched in: - 3.5.4 - 3.4.6 - 3.3.7 - 3.1.10 - 2.9.51 ### Workarounds No workarounds available. ### References [GHSA-mh98-763h-m9v4](https://github.com/juju/juju/security/advisories/GHSA-mh98-763h-m9v4) https://github.com/juju/juju/blob/725800953aaa29dbeda4f806097bf838e61644dd/worker/uniter/paths.go#L222

CVE-2024-8037 Affected Github.com/juju/juju Versions

1 component(s)
Fixed Versions:
0.0.0-20240820065804-2f2ec128ef5a
Product / Package Ecosystem Affected Versions Fixed Version
github.com/juju/juju
Go
< 0.0.0-20240820065804-2f2ec128ef5a
0.0.0-20240820065804-2f2ec128ef5a

References

Frequently Asked Questions

What is CVE-2024-8037?
CVE-2024-8037 is a security vulnerability in Github.com/juju/juju involving Vulnerable juju hook tool abstract UNIX domain socket under CWE-284: Improper Access Control.
Which Github.com/juju/juju versions are affected?
Affected versions include releases prior to 0.0.0-20240820065804-2f2ec128ef5a across affected packages: github.com/juju/juju.
What version fixes CVE-2024-8037?
Upgrading to 0.0.0-20240820065804-2f2ec128ef5a (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 0.0.0-20240820065804-2f2ec128ef5a. Upgrade your dependency to 0.0.0-20240820065804-2f2ec128ef5a or later.
What is the CVSS score of CVE-2024-8037?
CVE-2024-8037 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:H.
What CWE is associated with CVE-2024-8037?
CVE-2024-8037 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 CVE-2024-8037?
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-8v4w-f4r9-7h6x",
  "modified" : "2024-10-09T22:40:00Z",
  "published" : "2024-10-03T16:53:20Z",
  "aliases" : [ "CVE-2024-8037" ],
  "summary" : "Vulnerable juju hook tool abstract UNIX domain socket",
  "details" : "### Impact\nWhen combined with an attack of `JUJU_CONTEXT_ID`, any user on the local system with access to the default network namespace may connect to the `@/var/lib/juju/agents/unit-xxxx-yyyy/agent.socket` and perform actions that are normally reserved to a juju charm.\n\n### Patches\nPatch: https://github.com/juju/juju/commit/2f2ec128ef5a8ca81fc86ae79cfcdbab0007c206\nPatched in:\n- 3.5.4\n- 3.4.6\n- 3.3.7\n- 3.1.10\n- 2.9.51\n\n### Workarounds\nNo workarounds available.\n\n### References\n[GHSA-mh98-763h-m9v4](https://github.com/juju/juju/security/advisories/GHSA-mh98-763h-m9v4)\nhttps://github.com/juju/juju/blob/725800953aaa29dbeda4f806097bf838e61644dd/worker/uniter/paths.go#L222",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:H/SA:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/juju/juju"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.0.0-20240820065804-2f2ec128ef5a"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/juju/juju/security/advisories/GHSA-8v4w-f4r9-7h6x"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/juju/juju/security/advisories/GHSA-mh98-763h-m9v4"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-8037"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/juju/juju/commit/2f2ec128ef5a8ca81fc86ae79cfcdbab0007c206"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/juju/juju"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/juju/juju/blob/725800953aaa29dbeda4f806097bf838e61644dd/worker/uniter/paths.go#L222"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2024-3174"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-284" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-10-03T16:53:20Z",
    "nvd_published_at" : null
  }
}