Skip to content

GHSA-5cj2-rqqf-hx9p CVE-2026-32694 GO-2026-4778

Juju affected by Confused Deputy IDOR attack via Predictable user specified ID in Juju Secrets

Medium Go
Severity
6.6 / 10
Medium · CVSS 3.1
Exploit chance (EPSS)
0.28%
Chance of exploitation in the next 30 days. Higher than 20.41% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-343 Predictable Value Range from Previous Values
Fix
0.0.0-20260319091847-d06919eb03ec
Upgrade github.com/juju/juju to this version or later

Description

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)

Affected versions

Go

PackageVulnerableFixed in
github.com/juju/juju
>= 0.0.0-20221021155847-35c560704ee2, < 0.0.0-20260319091847-d06919eb03ec
0.0.0-20260319091847-d06919eb03ec

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

github.com/juju/juju Go → 0.0.0-20260319091847-d06919eb03ec

go
go get github.com/juju/juju@v0.0.0-20260319091847-d06919eb03ec && go mod tidy

Severity breakdown

CVSS 3.1 6.6

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

Attack vector
Network
Attack complexity
High
Privileges required
High
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Weakness

CWE-343: Predictable Value Range from Previous Values

The product's random number generator produces a series of values which, when observed, can be used to infer a relatively small range of possibilities for the next value that could be generated.

How to prevent it
  • Increase the entropy used to seed a PRNG.
  • Architecture and Design, Requirements: Use products or modules that conform to FIPS 140-2 [REF-267] to avoid obvious entropy problems. Consult FIPS 140-2 Annex C ("Approved Random Number Generators").
  • Implementation: Use a PRNG that periodically re-seeds itself using input from high-quality sources, such as hardware devices with high entropy. However, do not re-seed too frequently, or else the entropy source might block.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-7m55-2hr4-pw78
Juju: In-Memory Token Store for Discharge Tokens Lacks Concurrency Safety and Persistence
Medium Also affects github.com/juju/juju
GHSA-w5fq-8965-c969
Juju: CloudSpec method leaking cloud credentials
Medium Also affects github.com/juju/juju
GHSA-245v-p8fj-vwm2
Juju has a resource poisoning vulnerability
Medium Also affects github.com/juju/juju
GHSA-j6f6-jp3p-53mw
Juju: Read All Controller Logs From Compromised Workload
Medium Also affects github.com/juju/juju
GHSA-gvrj-cjch-728p
Juju has Improper TLS Client/Server authentication and certificate verification on Database Cluster
Critical Also affects github.com/juju/juju
GHSA-439w-v2p7-pggc
Juju has unauthorized access to out-of-scope Kubernetes secrets
High Also affects github.com/juju/juju
GHSA-89x7-5m5m-mcmm
Juju has unauthorized update of out-of-scope Vault secrets
Medium Also affects github.com/juju/juju
GHSA-gfgr-6hrj-85ww
Juju affected by timing ownership claim attack on new external back-end secrets
Medium Also affects github.com/juju/juju
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor