{"id":"GHSA-9gqj-583v-mpqp","summary":"Istio: AuthorizationPolicy ipBlocks, notIpBlocks and source.ip not enforced on waypoints and sidecar HBONE inbound","details":"### Summary\n\n`AuthorizationPolicy` `source.ipBlocks`, `source.notIpBlocks` and the `source.ip` condition on ambient waypoints, and on sidecars receiving HBONE traffic, match the Envoy internal listener address, not the client IP. `DENY` rules on `ipBlocks` fail open, `notIpBlocks` rules match every request. `CUSTOM` rules on `ipBlocks` skip the external authorizer.\n\n### Details\n\n`ipBlocks`, `notIpBlocks` and `source.ip` are translated to the RBAC `direct_remote_ip` principal ([generator.go](https://github.com/istio/istio/blob/1.31.3/pilot/pkg/security/authz/model/generator.go#L151-L157)). Waypoints, and sidecars for HBONE inbound traffic, enforce policy on the `main_internal` internal listener, where the direct remote address is always `envoy://internal`. The `original_dst` listener filter only restores the remote address, so `remoteIpBlocks`/`notRemoteIpBlocks` and `remote.ip` (`remote_ip`) work but `ipBlocks`/`notIpBlocks`/`source.ip` never see the client IP. This applies to `ALLOW`, `DENY` and `CUSTOM` actions. HTTP and TCP traffic are both affected.\n\nFixes are available in 1.31.4 and 1.30.8.\n\nWorkaround: use `remoteIpBlocks`, `notRemoteIpBlocks` and `remote.ip` instead of `ipBlocks`, `notIpBlocks` and `source.ip` in policies that apply to waypoints or to sidecars receiving HBONE traffic.\n\n\n\n### Proof of concept\n\nAmbient namespace with a client pod and a waypoint, then a `DENY` on the client pod IP:\n\n```yaml\napiVersion: security.istio.io/v1\nkind: AuthorizationPolicy\nmetadata: {name: deny-test, namespace: amb}\nspec:\n  targetRefs: [{kind: Gateway, group: gateway.networking.k8s.io, name: waypoint}]\n  action: DENY\n  rules: [{from: [{source: {ipBlocks: [\"\u003cclient-pod-ip\u003e/32\"]}}]}]\n```\n\nRequests from the client through the waypoint are still allowed. Same policy with `remoteIpBlocks` denies them. `notIpBlocks: [\"\u003cclient-pod-ip\u003e/32\"]` denies the client. Full steps in https://github.com/istio/istio/issues/62522.\n\n\n### Impact\n\nAuthorization bypass. Users relying on `ipBlocks` or `source.ip` in `DENY`, `ALLOW` or `CUSTOM` policies on waypoints, or on sidecars receiving HBONE traffic from ambient workloads, to restrict clients get no enforcement from those rules, and `notIpBlocks` rules can deny legitimate traffic. Gateways are not affected in any release. Sidecars are only affected for HBONE traffic.","aliases":["CVE-2026-145239"],"modified":"2026-12-05T18:48:25.154811144Z","published":"2026-12-04T22:11:59Z","database_specific":{"severity":"MODERATE","github_reviewed":true,"github_reviewed_at":"2026-12-04T22:11:59Z","nvd_published_at":"2026-12-04T21:17:57Z","cwe_ids":["CWE-863"]},"references":[{"type":"WEB","url":"https://github.com/istio/istio/security/advisories/GHSA-9gqj-583v-mpqp"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-145239"},{"type":"WEB","url":"https://github.com/istio/istio/issues/62522"},{"type":"WEB","url":"https://github.com/istio/istio/pull/62558"},{"type":"WEB","url":"https://github.com/istio/istio/pull/62636"},{"type":"WEB","url":"https://github.com/istio/istio/pull/62644"},{"type":"WEB","url":"https://github.com/istio/istio/pull/62645"},{"type":"WEB","url":"https://github.com/istio/istio/commit/6a20e06275da959a4d06ffbcc8260e5891d0143c"},{"type":"WEB","url":"https://github.com/istio/istio/commit/9dbea67dd920f0d52ae3d1acb865c750375086bb"},{"type":"WEB","url":"https://github.com/istio/istio/commit/d06f9cb29e319153d6806474405032bbbfd99561"},{"type":"WEB","url":"https://github.com/istio/istio/commit/d9fa8b0cb2f652579659bde1ebcf7b3bdf013471"},{"type":"PACKAGE","url":"https://github.com/istio/istio"},{"type":"WEB","url":"https://github.com/istio/istio/releases/tag/1.30.8"},{"type":"WEB","url":"https://github.com/istio/istio/releases/tag/1.31.4"},{"type":"WEB","url":"https://github.com/istio/istio/releases/tag/1.32.0"}],"affected":[{"package":{"name":"istio.io/istio","ecosystem":"Go","purl":"pkg:golang/istio.io/istio"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-20260112152740-3af7534ca9a9"},{"fixed":"0.0.0-20261104183325-d9fa8b0cb2f6"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-9gqj-583v-mpqp/GHSA-9gqj-583v-mpqp.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L"}]}