CVE-2026-145364 — Istio.io/istio — CWE-693 · CWE-783
### Summary A boolean operator-precedence bug in `convertPeerAuthentication()` (`pilot/pkg/serviceregistry/ambient/authorization.go`) makes Istio ambient mode silently drop per-port STRICT mTLS enforcement. The mesh-level check is missing the "workload-level policy is unset" guard, so the port is wrongly treated as already covered by the mesh-wide STRICT policy. ### Details A boolean operator-precedence error in `convertPeerAuthentication()` ( `pilot/pkg/serviceregistry/ambient/authorization.go` ) causes Istio ambient mode to silently skip enforcement of a portLevelMtls STRICT setting. When a workload-level `PeerAuthentication` has mode `PERMISSIVE` or `DISABLE`, it can also set `portLevelMtls` to `STRICT` on a specific port. If the namespace has no `STRICT` `PeerAuthentication` and the mesh-wide (root namespace) `PeerAuthentication` is `STRICT`, the port is wrongly treated as already enforced by the parent policy. The "workload-level policy is unset" guard applies only to the namespace-level check. The mesh-level check is evaluated without it. As a result, the per-port `DENY` policy is not generated and not sent to ztunnel. The workload still references it by name, which leaves a dangling reference. ztunnel then accepts plaintext connections on a port the operator configured to require mTLS. Sidecar mode enforces `STRICT` correctly in the same configuration, so this is an ambient-only divergence. There is no error or warning. Fixes are available in 1.31.4 and 1.
### Summary A boolean operator-precedence bug in `convertPeerAuthentication()` (`pilot/pkg/serviceregistry/ambient/authorization.go`) makes Istio ambient mode silently drop per-port STRICT mTLS enforcement. The mesh-level check is missing the "workload-level policy is unset" guard, so the port is wrongly treated as already covered by the mesh-wide STRICT policy. ### Details A boolean operator-precedence error in `convertPeerAuthentication()` ( `pilot/pkg/serviceregistry/ambient/authorization.go` ) causes Istio ambient mode to silently skip enforcement of a portLevelMtls STRICT setting. When a workload-level `PeerAuthentication` has mode `PERMISSIVE` or `DISABLE`, it can also set `portLevelMtls` to `STRICT` on a specific port. If the namespace has no `STRICT` `PeerAuthentication` and the mesh-wide (root namespace) `PeerAuthentication` is `STRICT`, the port is wrongly treated as already enforced by the parent policy. The "workload-level policy is unset" guard applies only to the namespace-level check. The mesh-level check is evaluated without it. As a result, the per-port `DENY` policy is not generated and not sent to ztunnel. The workload still references it by name, which leaves a dangling reference. ztunnel then accepts plaintext connections on a port the operator configured to require mTLS. Sidecar mode enforces `STRICT` correctly in the same configuration, so this is an ambient-only divergence. There is no error or warning. Fixes are available in 1.31.4 and 1.
CVE‑2026‑145364 – Istio Ambient Mode – Port‑Level STRICT mTLS Bypass
Published 04 Dec 2026 – CVSS 3.1 8.2 (HIGH)
🎯 What is this vulnerability?
| Attribute | Detail | ||
|---|---|---|---|
| CWE | CWE‑693: Protection Mechanism Failure – the code that should enforce mTLS is never reached.<br>CWE‑783: Operator Precedence Error – a logical expression is evaluated in the wrong order, causing a guard clause to be skipped. | ||
| Component | pilot/pkg/serviceregistry/ambient/authorization.go – function convertPeerAuthentication() that translates PeerAuthentication CRDs into the ambient‑mode authorization model that is shipped to the ztunnel data plane. | ||
| Root cause | The function builds a boolean expression that decides whether a *port‑level* STRICT mTLS setting must be emitted as a DENY rule for the workload. The expression mixes two checks with && and | without parentheses, so the *“workload‑level policy is unset”* guard is applied only to the namespace‑level check. When a mesh‑wide PeerAuthentication is STRICT (the default in many installations) and the workload’s own PeerAuthentication is PERMISSIVE/DISABLE but defines a portLevelMtls entry with mode STRICT, the expression evaluates to *true* and the code assumes the port is already covered by the mesh‑wide policy. Consequently the per‑port DENY rule is not generated and the workload’s reference to that rule becomes dangling. The ztunnel therefore accepts plaintext traffic on that port, while sidecar mode would still enforce STRICT. No error or warning is emitted, making the bug silent. | |
| Why it matters | The bug removes the only enforcement point for a per‑port mTLS requirement. An attacker who can reach the workload’s IP/port (e.g., via the cluster network, a compromised pod, or a compromised edge gateway) can send unencrypted traffic that the service will accept, bypassing the intended confidentiality guarantee. Because the bug is in the control‑plane logic, it does not require any special privileges to trigger – the presence of the mis‑configured PeerAuthentication is sufficient. |
⚡ Attack Chain
Below is a realistic, step‑by‑step exploitation scenario. All commands are illustrative; exact resource names, namespaces, and ports will differ per deployment.
1. Discovery & Reconnaissance
| Step | Action | Tool / Command | |
|---|---|---|---|
| 1.1 | Identify that the cluster runs Istio (ambient mode) and locate the control‑plane version. | kubectl get pods -n istio-system -l app=istiod -o jsonpath='{.items[0].spec.containers[0].image}' | |
| 1.2 | Verify the Istio version is < 1.31.4 (or any 1.x version prior to the back‑ported fix). | Same command as above; compare the tag. | |
| 1.3 | Enumerate PeerAuthentication resources to find a workload that overrides the mesh‑wide policy with a per‑port STRICT setting while the workload‑level mode is PERMISSIVE or DISABLE. | kubectl get peerauthentication -A -o yaml | grep -A5 "portLevelMtls" |
| 1.4 | Confirm that the mesh‑wide PeerAuthentication (in the root namespace, usually istio-system) is set to STRICT. | kubectl get peerauthentication -n istio-system default -o yaml | |
| 1.5 | Determine the IP address and port of the target workload (e.g., a service exposing port 8443). | kubectl get svc <svc> -n <ns> -o jsonpath='{.spec.clusterIP}' and kubectl get svc <svc> -n <ns> -o jsonpath='{.spec.ports[?(@.port==8443)].port}' |
2. Exploitation
Because the bug is a logic omission, there is no “payload” that needs to be delivered to the control plane. The attacker simply uses the mis‑configured workload to send plain‑text traffic where the operator expects mTLS.
2.1. Verify that the port accepts plaintext
# Illustrative example – replace <IP> and <PORT> with the values discovered above
# Attempt a plain‑text HTTP request (or any protocol the service expects)
printf "GET / HTTP/1.1\r\nHost: vulnerable.example\r\n\r\n" | \
nc -w5 <IP> <PORT>If the service replies (e.g., with an HTTP 200) the attacker knows that mTLS is not enforced on that port.
2.2. Exploit the lack of encryption
If the service is a gRPC API that expects a client certificate, the attacker can now invoke any RPC without presenting a cert.
# Example using grpcurl (illustrative)
grpcurl -plaintext -d '{"user":"admin"}' \
<IP>:<PORT> myservice.AuthService/LoginBecause the connection is plaintext, the attacker can also sniff traffic (e.g., via a compromised pod on the same node) and replay or modify it.
3. Post‑Exploitation
| Goal | How it is achieved |
|---|---|
| Confidentiality breach | Capture sensitive request/response payloads (credentials, tokens, business data) that travel in clear text over the mesh. |
| Integrity manipulation | Modify request bodies or headers before they reach the service (e.g., change a role claim) because the traffic is no longer protected by TLS. |
| Lateral movement | Use the unauthenticated connection to invoke privileged RPCs that would otherwise require a client cert, potentially gaining access to internal admin APIs. |
| Persistence | Deploy a malicious sidecar or a “proxy‑pod” that forwards traffic to the vulnerable port, allowing the attacker to maintain a clear‑text foothold even after the original pod restarts. |
Note: The vulnerability does not give remote code execution on the control plane; the impact is limited to the data‑plane confidentiality/integrity of the affected ports.
🌍 Real‑World Impact
| CIA Triad | CVSS Vector Interpretation | Practical Consequence |
|---|---|---|
| Confidentiality (C:H) | C:H – High impact. Plain‑text traffic can be intercepted by any pod on the same network, a compromised node, or a malicious insider, exposing secrets, PII, or proprietary data. | |
| Integrity (I:L) | I:L – Low impact. An attacker can tamper with the payload, but only if they have network reachability to the workload. The lack of mTLS removes cryptographic integrity guarantees. | |
| Availability (A:N) | A:N – No direct impact on service availability. The bug does not cause crashes or denial‑of‑service. | |
| Overall | High – The primary risk is data leakage and potential privilege escalation via unauthenticated API calls. In regulated environments (PCI‑DSS, HIPAA, GDPR) the loss of confidentiality alone can be a compliance violation. |
Typical scenarios where the impact is severe
- Financial services exposing payment‑gateway APIs over ambient mode.
- Healthcare workloads transmitting PHI.
- Multi‑tenant clusters where one tenant can reach another tenant’s pod IP (e.g., via a shared node).
🛡️ Remediation & Mitigation
1. Patch / Upgrade
| Affected releases | Fixed in |
|---|---|
| Istio 1.30.x and earlier (including any 1.31.0‑1.31.3) | Istio 1.31.4 |
| Istio 1.31.x (pre‑1.31.4) | Istio 1.31.4 |
| Istio 1.32+ (future releases) | The fix is back‑ported; any version ≥ 1.31.4 includes it. |
Action:
# Example upgrade using istioctl (replace <desired-version> as needed)
istioctl install --set profile=default \
--set hub=gcr.io/istio-release \
--set tag=1.31.4 \
-yVerify the version after upgrade: istioctl version.
2. Immediate Workarounds (if patch cannot be applied)
| Workaround | Description | Implementation |
|---|---|---|
| Disable Ambient Mode for the affected namespace | Switch the namespace back to classic sidecar injection, where the bug does not exist. | ``kubectl label namespace <ns> istio.io/rev=default --overwrite` (assuming default is a sidecar‑based revision). |
Enforce mesh‑wide PERMISSIVE and rely on sidecar‑level mTLS | Remove the mesh‑wide STRICT PeerAuthentication and instead create per‑namespace STRICT policies that include the required ports. This eliminates the scenario where the mesh‑wide check bypasses the port‑level rule. | `kubectl delete peerauthentication -n istio-system default` then create a namespace‑level PeerAuthentication with mode: STRICT and no portLevelMtls entries. |
Explicitly set portLevelMtls to DISABLE on the workload | If the workload does not need per‑port STRICT, set it to DISABLE to avoid the dangling reference. | `kubectl patch peerauthentication <workload> -n <ns> --type merge -p '{"spec":{"portLevelMtls":[{"port":8443,"mode":"DISABLE"}]}}'` |
| Network‑policy isolation | Restrict which pods can reach the vulnerable workload’s IP/port, limiting the attack surface to trusted pods only. | `kubectl apply -f - <<EOF\napiVersion: networking.k8s.io/v1\nkind: NetworkPolicy\nmetadata:\n name: allow-only-trusted\n namespace: <ns>\nspec:\n podSelector:\n matchLabels:\n app: vulnerable-app\n ingress:\n - from:\n - podSelector:\n matchLabels:\n role: trusted-client\n ports:\n - protocol: TCP\n port: 8443\nEOF` |
| Enable Istio telemetry alerts | Create a Prometheus/Alertmanager rule that fires when a workload references a non‑existent DENY rule (the ztunnel metric istio_ztraffic_policy_missing – illustrative). | `yaml\n- alert: ZtunnelMissingPolicy\n expr: istio_ztraffic_policy_missing > 0\n for: 1m\n labels:\n severity: warning\n annotations:\n summary: \"ztunnel missing policy for workload {{ $labels.workload }}\"\n description: \"A workload references a port‑level mTLS policy that was not generated – possible CVE‑2026‑145364.\"`` |
3. Detection – Indicators of Compromise
| Indicator | Where to look | Example | ||||
|---|---|---|---|---|---|---|
ztunnel logs containing policy not found or fallback to plaintext for a specific workload/port. | kubectl logs -n istio-system -l app=ztunnel | time="2026-11-28T12:34:56Z" level=error msg="policy lookup failed for workload mysvc.my-ns, port 8443 – using plaintext" | ||||
Istio Pilot/istiod debug logs showing convertPeerAuthentication skipping portLevelMtls generation. | Enable pilot debug: kubectl -n istio-system edit configmap istio → set logLevel: debug | DEBUG: convertPeerAuthentication: skipping portLevelMtls for workload mysvc.my-ns (mesh-wide STRICT already applied) | ||||
Unexpected plaintext traffic captured by tcpdump on the node where the workload runs. | tcpdump -i any -nn port 8443 and not tls | 12:34:56.789012 IP 10.1.2.3.56789 > 10.1.2.4.8443: Flags [P.], seq 1:123, ack 1, win 229, length 122 | ||||
Prometheus metric istio_ztraffic_policy_generated_total not incrementing for the affected port while the workload’s PeerAuthentication includes a portLevelMtls: STRICT. | Query: istio_ztraffic_policy_generated_total{workload="my-svc",port="8443"} == 0 | Returns a series → indicates the rule was never generated. | ||||
Audit of PeerAuthentication resources – any workload that has mode: PERMISSIVE (or DISABLE) and a portLevelMtls entry with mode: STRICT. | kubectl get peerauthentication -A -o json | jq '.items[] | select(.spec.mode=="PERMISSIVE" or .spec.mode=="DISABLE") | select(.spec.portLevelMtls[]?.mode=="STRICT") | {ns:.metadata.namespace, name:.metadata.name}' | Lists potentially vulnerable workloads. |
⚠️ Urgency
AV:N, PR:N, UI:N). AC:L). STRICT everywhere. 1. Runs Istio ambient mode (the default in many newer installations).
2. Has a mesh‑wide STRICT PeerAuthentication.
3. Uses per‑port STRICT overrides on workloads that are otherwise PERMISSIVE or DISABLE.
If any of the above conditions are true, schedule the upgrade to Istio 1.31.4 (or later) immediately and apply one of the workarounds while the upgrade is in progress.
Bottom line: The bug removes the only enforcement point for a per‑port mTLS requirement in ambient mode, allowing clear‑text traffic where the operator expects encryption. The fix is a one‑line change to the boolean expression in
convertPeerAuthentication(). Upgrading to Istio 1.31.4 (or any later release that includes the back‑ported fix) eliminates the issue; until then, enforce sidecar mode, tighten network policies, and monitor the listed logs/metrics for signs of missing policies.[🤖 CVE Professor AI Security Engine]