CVE-2024-7558

8.7 HIGH

📋 TL;DR

CVE-2024-7558 allows unprivileged users on the same network namespace to guess the JUJU_CONTEXT_ID authentication secret and access Juju charm information and tools. This affects Juju deployments on both traditional machines and Kubernetes containers where charms are running. Attackers can gain unauthorized access to sensitive charm data and functionality.

💻 Affected Systems

Products:
  • Juju
Versions: All versions before the fix
Operating Systems: Linux
Default Config Vulnerable: ⚠️ Yes
Notes: Affects both traditional Juju machine deployments and Kubernetes-based Juju charm containers where network namespace isolation is insufficient.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete compromise of Juju charm functionality, allowing attackers to execute arbitrary commands, access sensitive configuration data, and potentially pivot to other systems in the Juju environment.

🟠

Likely Case

Unauthorized access to charm-specific secrets, configuration data, and the ability to manipulate charm operations, potentially leading to service disruption or data exposure.

🟢

If Mitigated

Limited impact if network namespaces are properly isolated and access controls prevent unauthorized users from reaching the abstract domain socket.

🌐 Internet-Facing: LOW - This vulnerability requires local network namespace access, not directly exploitable from the internet.
🏢 Internal Only: HIGH - Attackers with internal access to the same network namespace can easily exploit this predictable authentication mechanism.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires being in the same network namespace as the Juju charm, but the authentication secret is predictable and can be guessed.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Check the Juju GitHub security advisory for specific patched versions

Vendor Advisory: https://github.com/juju/juju/security/advisories/GHSA-mh98-763h-m9v4

Restart Required: Yes

Instructions:

1. Update Juju to the latest patched version. 2. Restart all affected Juju units and controllers. 3. Verify the fix by checking that JUJU_CONTEXT_ID is no longer predictable.

🔧 Temporary Workarounds

Network namespace isolation

linux

Ensure Juju charms run in isolated network namespaces where unprivileged users cannot access the abstract domain socket

Implement proper container isolation policies
Use Kubernetes network policies to restrict namespace access

🧯 If You Can't Patch

  • Implement strict access controls to prevent unauthorized users from accessing the same network namespace as Juju charms
  • Monitor for unusual access attempts to Juju abstract domain sockets and investigate any unauthorized connections

🔍 How to Verify

Check if Vulnerable:

Check if unprivileged users in the same network namespace can connect to the Juju abstract domain socket and guess the JUJU_CONTEXT_ID value

Check Version:

juju version

Verify Fix Applied:

Verify that JUJU_CONTEXT_ID is no longer predictable and that unauthorized users cannot access charm functionality

📡 Detection & Monitoring

Log Indicators:

  • Unauthorized connection attempts to Juju abstract domain sockets
  • Failed authentication attempts with guessed JUJU_CONTEXT_ID values

Network Indicators:

  • Unexpected connections to abstract domain sockets from unauthorized users

SIEM Query:

Search for process connections to abstract sockets with pattern '*juju*' from unauthorized user accounts

🔗 References

📤 Share & Export