6.6medium
Insecure Direct Object Reference attack via predictable secret ID in Juju
- Severity
- 6.6medium CVSS:3.1 by canonical
- Exploit likelihood
- 0.26% (higher than 18% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- canonical
- Also known as
- GHSA-5cj2-rqqf-hx9pGO-2026-4778
Description
In Juju from version 3.0.0 through 3.6.18, when a secret owner grants permissions to a secret to a grantee, the secret owner relies exclusively on a predictable XID of the secret to verify ownership. This allows a malicious grantee which can request secrets to predict past secrets granted by the same secret owner to different grantees, allowing them to use the resources granted by those past secrets. Successful exploitation relies on a very specific configuration, specific data semantic, and the administrator having the need to deploy at least two different applications, one of them controlled by the attacker.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| juju | from 3.0.0 before 3.6.19 | CVE List |
| github.com/juju/juju (Go) | from 0.0.0-20221021155847-35c560704ee2 before 0.0.0-20260319091847-d06919eb03ec | GitHub Advisory Database, Go Vulnerability Database |
| canonical juju | from 3.0.0 before 3.6.19 | NVD |
All scores
| canonical | 6.6medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 6.6medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H |
Classification
What each source says
CVE List
In Juju from version 3.0.0 through 3.6.18, when a secret owner grants permissions to a secret to a grantee, the secret owner relies exclusively on a predictable XID of the secret to verify ownership. This allows a malicious grantee which can request secrets to predict past secrets granted by the same secret owner to different grantees, allowing them to use the resources granted by those past secrets. Successful exploitation relies on a very specific configuration, specific data semantic, and the administrator having the need to deploy at least two different applications, one of them controlled by the attacker.
GitHub Advisory Database
Summary
Predictable secret ID and lack of secret origin API enable confused deputy attacks on Juju workloads.
Details
A Juju application can create a secret and grant it to another integrated application (grantee).
When they do so, the secret owner has to communicate the secret id to the grantee.
The grantee, having received the secret id can load the secret content and perform operations on behalf of the secret owner.
However, today the grantee has no way to determine which granted secret belongs to which owner.
Instead the grantee relies on:
- being able to read the secret by id (secret was in fact granted, by some entity)
- secret id was received over a relation (the remote end of the relation is presumed to be secret owner)
Additionally, secret IDs are XID, which are predictable, here two secrets created by two distinct apps in the same K8s model close in time:
d34vsl7mp25c76301hs0
time (UTC): 2025-09-17 00:18:28 (Unix 1758068308)
machine: f6c88a
pid: 50072
counter: 6294648
d34vslfmp25c76301hsg
time (UTC): 2025-09-17 00:18:29 (Unix 1758068309)
machine: f6c88a
pid: 50072
counter: 6294649
PoC
This allows for an IDOR attack where:
- actors:
- a Good application (the owner of the Victim),
- an Evil application, and
- a Provider application (the Confused Deputy)
- relations: Good --- Provider, Evil --- Provider
- secrets: Good and Evil create Secrets, granting them to the Provider and communicate Secret IDs with the Provider.
- semantics: the Provider performs some operation on behalf of the Good/Evil using the Secret.
- weakness 1: Evil can guess the Secret ID that Good granted and communicated to Provider.
- weakness 2: Juju doesn't provide the Provider application the facility to verify the provenance of the Secret IDs.
- exploit: Evil passes Good's secret id to Provider.
- bypass: Provider performs evil operation with Good's Secret ID on behalf of Evil.
Evil could benefit by:
- exfiltrating Good's Secret via reflection.
- reading or mutating Good's resources accessible via *Good's Secret.
Impact
This requires a complex setup.
Not all shared secrets are used like above, so an actual exploit requires a very specific relation interface, specific semantics of the data in the databag, and an administrator having a reasonable need to deploy two apps (one evil, one good) related to the same (third) provider app.
If exploited, it can be very hard to determine what went wrong after the fact.
Suggested remediation
1. Longer, random secret IDs
For example, if the secret id was extended with a 128-bit nonce, guessing a sibling secret ID would be infeasible, and an attack of this style would require another weakness (e.g. secret IDs exposed in logs)
2. Grantee secret API
Today, an app is not allowed to call secret-info-get on the granted secret.
Additionally, granted secrets are not included in the secret-ids output.
Suppose that the Provider could run these hook tools:
(provider/0)> secret-ids
my-own-secret-123
(provider/0)> secret-ids --grants
good-secret-id-42
evil-secret-id-43
(provider/0)> secret-info-get good-secret-id-42
good-secret-id-42:
revision: 1
label: ""
owner: good
grant-relation-id: 12
rotation: never
The Provider would then able to validate the secret ID it's about to use against:
- the relation in which the secret ID has been passed (good relation 12 or evil relation 14)
- the application or unit name of the secret owner (good or evil)
Go Vulnerability Database
Juju affected by Confused Deputy IDOR attack via Predictable user specified ID in Juju Secrets in github.com/juju/juju
NVD (es)
En Juju desde la versión 3.0.0 hasta la 3.6.18, cuando un propietario de secreto otorga permisos a un secreto a un beneficiario, el propietario del secreto se basa exclusivamente en un XID predecible del secreto para verificar la propiedad. Esto permite a un beneficiario malicioso que puede solicitar secretos predecir secretos pasados otorgados por el mismo propietario de secreto a diferentes beneficiarios, permitiéndoles usar los recursos otorgados por esos secretos pasados. La explotación exitosa se basa en una configuración muy específica, una semántica de datos específica y en que el administrador tenga la necesidad de desplegar al menos dos aplicaciones diferentes, una de ellas controlada por el atacante.
References
| https://github.com/juju/juju/security/advisories/GHSA-5cj2-rqqf-hx9p | advisory, exploit, vdb-entry, vendor-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-32694 | advisory | |
| https://github.com/juju/juju/commit/d06919eb03ec68156818bcc304b5fe1c39a8f9e9 | fix, web | |
| https://github.com/juju/juju | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-32694 changed 2026-03-18 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-5cj2-rqqf-hx9p changed 2026-03-23 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2026-4778 changed 2026-03-23 | CC-BY-4.0 |
| NVD | CVE-2026-32694 changed 2026-06-17 | Public domain |