Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/juju/juju
  4. ›
  5. CVE-2024-7558

CVE-2024-7558: JUJU_CONTEXT_ID is a predictable authentication secret

October 3, 2024 (updated October 9, 2024)

JUJU_CONTEXT_ID is the authentication measure on the unit hook tool abstract domain socket. It looks like JUJU_CONTEXT_ID=appname/0-update-status-6073989428498739633.

This value looks fairly unpredictable, but due to the random source used, it is highly predictable.

JUJU_CONTEXT_ID has the following components:

  • the application name
  • the unit number
  • the hook being currently run
  • a uint63 decimal number

On a system the application name and unit number can be deduced by reading the structure of the filesystem. The current hook being run is not easily deduce-able, but is a limited set of possible values, so one could try them all. Finally the random number, this is generated from a non cryptographically secure random source. Specifically the random number generator built into the go standard library, using the current unix time in seconds (at startup) as the seed.

There is no rate limiting on the abstract domain socket, the only limiting factor is time (window of time the hook is run) and memory (how much memory is available to facilitate all the connections).

References

  • github.com/advisories/GHSA-mh98-763h-m9v4
  • github.com/juju/juju
  • github.com/juju/juju/commit/ecd7e2d0e9867576b9da04871e22232f06fa0cc7
  • github.com/juju/juju/security/advisories/GHSA-mh98-763h-m9v4
  • nvd.nist.gov/vuln/detail/CVE-2024-7558
  • pkg.go.dev/vuln/GO-2024-3173

Code Behaviors & Features

Detect and mitigate CVE-2024-7558 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.0.0-20240826044107-ecd7e2d0e986

Fixed versions

  • 0.0.0-20240826044107-ecd7e2d0e986

Solution

Upgrade to version 0.0.0-20240826044107-ecd7e2d0e986 or above.

Impact 8.7 HIGH

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-1391: Use of Weak Credentials
  • CWE-337: Predictable Seed in Pseudo-Random Number Generator (PRNG)
  • CWE-340: Generation of Predictable Numbers or Identifiers

Source file

go/github.com/juju/juju/CVE-2024-7558.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:10 +0000.