# CVE-2024-6984: Juju's unprivileged user running on charm node can leak any secret or relation data accessible to the local charm

> A local unprivileged attacker can leak sensitive context IDs in Juju, allowing access to other sensitive data or relations accessible to the local charm.

- **Severity:** High 8.8 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 29 Jul 2024
- **Updated:** 1 Aug 2024
- **Also known as:** GHSA-6vjm-54vp-mxhx, GO-2024-3010, GO-2024-3040

## What is CVE-2024-6984?

CVE-2024-6984 is a high-severity vulnerability in Canonical Ltd. Juju, published on 29 Jul 2024. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

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.

Weakness: CWE-209 (Generation of Error Message Containing Sensitive Information)

## Which versions are affected by CVE-2024-6984?

12 open source packages ship an affected version, including github.com/juju/juju. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/juju/juju` | Go | All versions | None |
| `github.com/juju/juju` | Go | All versions | None |
| `github.com/juju/juju` | Go | All versions | 2.9.50 |
| `github.com/juju/juju` | Go | All versions | 2.9.50 |
| `github.com/juju/juju` | Go | From 3.0.0 | 3.1.9 |
| `github.com/juju/juju` | Go | From 3.0.0 | 3.1.9 |
| `github.com/juju/juju` | Go | From 3.2.0 | 3.3.6 |
| `github.com/juju/juju` | Go | From 3.2.0 | 3.3.6 |
| `github.com/juju/juju` | Go | From 3.4.0 | 3.4.5 |
| `github.com/juju/juju` | Go | From 3.4.0 | 3.4.5 |
| `github.com/juju/juju` | Go | From 3.5.0 | 3.5.3 |
| `github.com/juju/juju` | Go | From 3.5.0 | 3.5.3 |

Products: Canonical Juju.

## How do I fix CVE-2024-6984?

Upgrade github.com/juju/juju to a fixed version for your release line: 2.9.50, 3.1.9, 3.3.6 or 3.4.5.

## Is CVE-2024-6984 being exploited?

There is no known exploitation of CVE-2024-6984 in the wild and no public exploit code.

## Other vulnerabilities in Canonical Ltd. Juju

- [CVE-2026-4370](https://insights.sbomify.com/CVE-2026-4370/): Improper TLS Client/Server authentication and certificate verification on Database Cluster (critical 10.0)
- [CVE-2026-5412](https://insights.sbomify.com/CVE-2026-5412/): Juju CloudSpec API could leak senstive information (critical 9.9)
- [CVE-2017-9232](https://insights.sbomify.com/CVE-2017-9232/): Juju uses a UNIX domain socket without setting appropriate permissions (critical 9.8)
- [CVE-2026-32693](https://insights.sbomify.com/CVE-2026-32693/): Unauthorized access to Kubernetes secrets in Juju (high 8.8)
- [CVE-2025-0928](https://insights.sbomify.com/CVE-2025-0928/): Arbitrary executable upload via authenticated endpoint (high 8.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-6984 and fix it if it is affected.

What it is: CVE-2024-6984 is a high-severity vulnerability in Canonical Ltd. Juju, published on 29 Jul 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2024-6984 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/juju/juju (Go): affected all versions; no fix listed
- github.com/juju/juju (Go): affected all versions; no fix listed
- github.com/juju/juju (Go): affected all versions; fixed in 2.9.50
- github.com/juju/juju (Go): affected all versions; fixed in 2.9.50
- github.com/juju/juju (Go): affected from 3.0.0; fixed in 3.1.9
- github.com/juju/juju (Go): affected from 3.0.0; fixed in 3.1.9
- github.com/juju/juju (Go): affected from 3.2.0; fixed in 3.3.6
- github.com/juju/juju (Go): affected from 3.2.0; fixed in 3.3.6
- github.com/juju/juju (Go): affected from 3.4.0; fixed in 3.4.5
- github.com/juju/juju (Go): affected from 3.4.0; fixed in 3.4.5
- github.com/juju/juju (Go): affected from 3.5.0; fixed in 3.5.3
- github.com/juju/juju (Go): affected from 3.5.0; fixed in 3.5.3

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-6984/ (Markdown: https://insights.sbomify.com/CVE-2024-6984/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-6984
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-6984
- OSV: https://osv.dev/vulnerability/CVE-2024-6984

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-6984/
Summaries are generated and may contain mistakes; the official description above is the record.
