CVE-2023-0092

4.9 MEDIUM

📋 TL;DR

This vulnerability allows authenticated users with read access to the Juju controller model to download arbitrary files from the controller's filesystem through a crafted remote request. It affects Juju deployments where users have been granted read access to controller models. The issue is a path traversal vulnerability (CWE-22) that could expose sensitive system files.

💻 Affected Systems

Products:
  • Juju
Versions: Versions before 3.0.3
Operating Systems: All platforms running Juju
Default Config Vulnerable: ⚠️ Yes
Notes: Requires authenticated user with read access to the controller model. Default Juju deployments grant read access to certain users.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

An attacker could download sensitive configuration files, credentials, or system files, potentially leading to full system compromise if privileged credentials are exposed.

🟠

Likely Case

Authenticated users with read access could exfiltrate sensitive configuration data, potentially enabling further attacks or exposing operational secrets.

🟢

If Mitigated

With proper access controls limiting read access to trusted users only, the impact is reduced to authorized users potentially accessing files they shouldn't.

🌐 Internet-Facing: MEDIUM - If the Juju controller is exposed to the internet, authenticated attackers could exploit this remotely, but authentication is still required.
🏢 Internal Only: MEDIUM - Internal authenticated users with read access could exploit this to access sensitive files on the controller.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires authenticated access and knowledge of the API endpoint. The vulnerability is straightforward path traversal.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 3.0.3 and later

Vendor Advisory: https://github.com/advisories/GHSA-x5rv-w9pm-8qp8

Restart Required: Yes

Instructions:

1. Upgrade Juju to version 3.0.3 or later. 2. Restart the Juju controller service. 3. Verify the fix by checking the version and testing the vulnerable endpoint.

🔧 Temporary Workarounds

Restrict Controller Model Access

all

Limit read access to the controller model to only essential, trusted users.

juju grant <username> read <model-name>
juju revoke <username> read controller

🧯 If You Can't Patch

  • Implement strict access controls to limit which users have read access to controller models
  • Monitor and audit file download requests from the Juju controller API

🔍 How to Verify

Check if Vulnerable:

Check Juju version with 'juju version'. If version is below 3.0.3, the system is vulnerable.

Check Version:

juju version

Verify Fix Applied:

After upgrading to 3.0.3+, attempt to exploit the path traversal via the API endpoint; it should now be blocked.

📡 Detection & Monitoring

Log Indicators:

  • Unusual file download patterns from Juju API
  • Path traversal attempts in request logs
  • Multiple failed file access attempts

Network Indicators:

  • Unusual outbound traffic from Juju controller containing file data
  • Patterns of file download requests to non-standard paths

SIEM Query:

source="juju-controller" AND (url_path CONTAINS ".." OR url_path CONTAINS "/etc/" OR url_path CONTAINS "/root/")

🔗 References

📤 Share & Export