GHSA-2crx-44xc-8wq7

Suggest an improvement
Source
https://github.com/advisories/GHSA-2crx-44xc-8wq7
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-2crx-44xc-8wq7/GHSA-2crx-44xc-8wq7.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-2crx-44xc-8wq7
Aliases
Downstream
CGA (22)
Published
2026-12-04T23:00:04Z
Modified
2026-12-05T18:48:25Z
Severity
  • 6.8 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N CVSS Calculator
Summary
Istio: ztunnel does not enforce AuthorizationPolicy trust domain restrictions
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.

  • Replace trust domain restrictions with principal restrictions. Use principals: ["example.org/*"] for trustDomains: ["example.org"], notPrincipals: ["example.org/*"] for notTrustDomains: ["example.org"], and the source.principal condition for source.trustDomain. List the trust domain and each of its aliases explicitly. * and a trailing wildcard such as team-* can be written as principals: ["*"] and principals: ["team-*"]. Trade-offs: other wildcard forms cannot be expressed this way. principals and notPrincipals cannot be combined with serviceAccounts or notServiceAccounts. Values within principals are alternatives, so if a source already sets principals, keep only the entries that belong to the intended trust domains instead of adding a trust domain wildcard.
  • Enforce the policy at a waypoint proxy. Deploy a waypoint for the destination and attach the policy with targetRefs instead of a selector. Also apply a ztunnel-enforced ALLOW policy on the destination workload that admits only the waypoint identity, so that traffic cannot bypass the waypoint. Trade-offs: this adds a proxy hop, and the additional policy blocks clients that connect to the workload without passing through the waypoint. Remove the original selector policy, because ztunnel at the destination sees the waypoint identity as the source.

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>/
  • Observed: both clients receive 200. The ztunnel policy contains an empty match ([[[{}]]] in istioctl ztunnel-config policy -o json).
  • Expected: both connections are denied. The same policy on a sidecar workload returns 403.

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"]
  • Observed: the request from td-client receives 200. The request from td-other is denied.
  • Expected: both requests are denied. The same policy on a sidecar workload returns 403 for td-client.

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.

Database specific
{
    "cwe_ids":  [
        "CWE-636",
        "CWE-863"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-12-04T23:00:04Z",
    "nvd_published_at":  null,
    "severity":  "MODERATE"
}
References

Affected packages

Go / istio.io/istio

Package

Name
istio.io/istio
View open source insights on deps.dev
Purl
pkg:golang/istio.io/istio

Affected ranges

Type
SEMVER
Events
Introduced
0.0.0-20260112152740-3af7534ca9a9
Fixed
0.0.0-20261202191158-a07a301441fc

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-2crx-44xc-8wq7/GHSA-2crx-44xc-8wq7.json"