medium

CVE-2026-145367

Go · istio.io/istio

Summary

Istio: ztunnel does not enforce AuthorizationPolicy trust domain restrictions

Severity
medium
CVSS
6.8
EPSS
0.8% (p57)
CWE
CWE-636, CWE-863
Also known as
GHSA-2crx-44xc-8wq7
Published
2026-12-04
Updated
2026-12-04

Advisory details

Summary

In ambient mode, istiod does not correctly convert the trustDomains and notTrustDomains source fields, or the source.trustDomain condition, of an AuthorizationPolicy into the policy that ztunnel enforces. As a result, a DENY rule that relies on them can have no effect, and an ALLOW rule that combines them with other source fields can admit callers that it is meant to exclude. Sidecars and waypoint proxies enforce these restrictions.

Details

handleRule in pilot/pkg/serviceregistry/ambient/authorization.go converts AuthorizationPolicy rules for ztunnel. It builds each source match from IP blocks, namespaces, service accounts and principals. It never reads trustDomains or notTrustDomains. The intended behavior is to match them against the trust domain of the peer identity, as the sidecar and waypoint conversion does.

The effect depends on the rest of the rule:

Policy Behavior in ztunnel
DENY, source sets only trust domain fields The source becomes an empty match, which ztunnel never matches. If the rule has no other source, the whole rule never matches, including any to or when restrictions in it.
DENY, trust domain fields combined with another field, such as namespaces Only the other field is enforced. The rule denies more traffic than requested.
ALLOW, source sets only trust domain fields The source never matches. Traffic that should be allowed through it is not.
ALLOW, trust domain fields combined with another field Only the other field is enforced. Callers outside the requested trust domains, or in excluded ones, can be admitted.

For these two fields, the policy status does not report a problem and can show that the policy is attached to ztunnel. For a DENY rule whose sources set only trust domain fields and that has no to section, validation can return a warning that the policy will deny all TCP traffic. The actual behavior is the opposite.

The source.trustDomain condition is a related variant. ztunnel conversion treats it as an unsupported attribute. A DENY rule that uses it never matches. An ALLOW rule that uses it is omitted, which is more restrictive than requested. In this case the policy status reports an unsupported attribute. Depending on the release, the status message can wrongly describe the DENY policy as more restrictive than requested.

The fix enforces these restrictions in ztunnel, including trust domain aliases. Some restrictions cannot be expressed in ztunnel: a wildcard other than * or a single trailing wildcard, and some combinations of principals and trustDomains. For those, ALLOW rules are omitted, DENY rules can deny more traffic than requested, and the policy status reports it. Review such policies before upgrading.

Fixes are available in 1.30.9, 1.31.5 and 1.32.1 patch releases.

Workaround

Until you upgrade, express the restriction in a form that is enforced. Test the result, and apply the replacement before removing the original policy.

Proof of concept

An ambient workload httpbin runs in namespace td-server with no waypoint. Clients run in namespaces td-client and td-other. The mesh trust domain is cluster.local.

Case 1, a DENY that is not enforced:

apiVersion: security.istio.io/v1
kind: AuthorizationPolicy
metadata:
  name: deny-trust-domain
  namespace: td-server
spec:
  selector:
    matchLabels:
      app: httpbin
  action: DENY
  rules:
  - from:
    - source:
        trustDomains: ["cluster.local"]

Send a request from either client:

curl -s -o /dev/null -w '%{http_code}\n' http://httpbin.td-server:<port>/

Case 2, an ALLOW that admits an excluded trust domain. Remove the policy from case 1 and apply:

apiVersion: security.istio.io/v1
kind: AuthorizationPolicy
metadata:
  name: allow-namespace-except-trust-domain
  namespace: td-server
spec:
  selector:
    matchLabels:
      app: httpbin
  action: ALLOW
  rules:
  - from:
    - source:
        namespaces: ["td-client"]
        notTrustDomains: ["cluster.local"]

Impact

This affects ambient mode users who have an AuthorizationPolicy that is enforced by ztunnel (scoped by selector, namespace or root namespace) and that uses trustDomains, notTrustDomains or the source.trustDomain condition.

A caller that can reach an affected workload, and that the policy is meant to reject because of its trust domain, can access it. This affects the confidentiality and integrity of the protected service. No configuration change or Kubernetes permission is needed by the caller. Exploitation depends on how the operator wrote the policy. The typical attacker holds a valid identity in a trust domain that the mesh trusts. Where the workload also accepts plaintext traffic (PERMISSIVE mTLS), a DENY rule that uses only notTrustDomains also fails to reject callers that have no identity.

Some combinations have the opposite effect and reject legitimate traffic, as described in Details.

Not affected: policies enforced by sidecars, gateways or waypoint proxies (including targetRefs policies on a waypoint), policies that do not use trust domain restrictions, and mTLS authentication of peers.

References

Related advisories

Is your project exposed to this? Stateward checks every dependency on every pull request and flags it only if your code actually reaches it.

Check my repo

Summarize with AI

ChatGPTClaudePerplexity

Sources: CISA KEV (public domain), OSV.dev & GitHub Advisory Database (CC-BY-4.0), FIRST EPSS, NVD/CWE (public domain). Served live from the Stateward advisory database.