Skip to main content
Vulnerability Database/CVE-2025-30162

CVE-2025-30162: Cilium Gateway API Privilege Escalation

CVE-2025-30162 is a privilege escalation flaw in Cilium that bypasses network policies for Gateway API LoadBalancers, allowing unauthorized egress traffic. This article covers technical details, affected versions, and mitigation.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2025-30162 Overview

CVE-2025-30162 is an authorization flaw [CWE-863] in Cilium, an eBPF-based networking, observability, and security solution for Kubernetes. The vulnerability causes network policies that block egress traffic to incorrectly allow traffic destined for LoadBalancer services provisioned through Gateway API resources. Clusters that combine Gateway API Ingress with LB-IPAM or BGP-based LoadBalancer implementations and rely on namespace egress policies are affected. LoadBalancer resources deployed outside of Gateway API configurations are not impacted. The flaw permits workloads to reach services that network policies were explicitly designed to isolate.

Critical Impact

Egress network policies fail to enforce isolation against Gateway API LoadBalancers, allowing cross-namespace traffic that should be blocked.

Affected Products

  • Cilium v1.15.0 through v1.15.14
  • Cilium v1.16.0 through v1.16.7
  • Cilium v1.17.0 through v1.17.1

Discovery Timeline

  • 2025-03-24 - CVE-2025-30162 published to NVD
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2025-30162

Vulnerability Analysis

The vulnerability sits at the intersection of Cilium's Gateway API implementation and its network policy enforcement engine. Cilium supports Gateway API as a mechanism for declaring Ingress traffic routing. When a Gateway resource is created, Cilium provisions an associated LoadBalancer service, typically allocated an external IP through LB-IPAM or advertised via BGP. Network policies in Cilium match traffic against identities derived from Kubernetes labels and endpoints.

For LoadBalancers created through Gateway API resources, the egress policy evaluation path does not correctly associate the destination traffic with the intended workload identities. As a result, CiliumNetworkPolicy and standard NetworkPolicy rules that deny egress from one namespace to another fail to block traffic routed through a Gateway-managed LoadBalancer. The misclassification is scoped to Gateway API LoadBalancers; LoadBalancer services defined directly through standard Kubernetes manifests continue to enforce policy correctly.

Root Cause

The root cause is improper authorization logic in the policy enforcement path for Gateway API-provisioned LoadBalancers. Cilium does not apply the expected identity context when evaluating egress rules against these destinations. The fix is implemented upstream in Cilium v1.15.15, v1.16.8, and v1.17.2.

Attack Vector

Exploitation requires an attacker to control a workload inside a namespace governed by an egress network policy. The attacker sends traffic to the external IP of a Gateway API LoadBalancer that belongs to a service the policy is designed to block. Because the policy engine does not correctly evaluate the destination, the connection succeeds. The attack is local to the cluster dataplane and does not require authentication or user interaction, consistent with the published vector CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N.

// No verified public exploitation code is available for CVE-2025-30162.
// Refer to the GitHub Security Advisory GHSA-24qp-4xx8-3jvj for technical details.

Detection Methods for CVE-2025-30162

Indicators of Compromise

  • Successful TCP or HTTP connections from workloads in a restricted namespace to the external IP of a Gateway API-provisioned LoadBalancer.
  • Hubble flow records showing verdict=FORWARDED for traffic that matches a deny egress policy in the source namespace.
  • Unexpected cross-namespace communication patterns in clusters running affected Cilium versions with Gateway API enabled.

Detection Strategies

  • Audit running Cilium versions against the affected release ranges using cilium version or Helm chart metadata.
  • Query Hubble flow logs for egress traffic from policy-restricted namespaces reaching LoadBalancer IPs allocated by LB-IPAM or advertised via BGP.
  • Correlate Gateway resources with their backing LoadBalancer services and confirm policy enforcement with synthetic traffic tests.

Monitoring Recommendations

  • Enable Hubble flow logging and ship records to a centralized data store for retrospective analysis.
  • Alert on egress connections from namespaces that have default-deny CiliumNetworkPolicy or NetworkPolicy objects applied.
  • Track Gateway API object creation events in the Kubernetes audit log alongside LB-IPAM IP allocation events.

How to Mitigate CVE-2025-30162

Immediate Actions Required

  • Upgrade affected clusters to Cilium v1.15.15, v1.16.8, or v1.17.2 as applicable.
  • Inventory all Gateway resources and their backing LoadBalancer services to identify exposure.
  • Review egress CiliumNetworkPolicy and NetworkPolicy objects that depend on namespace isolation for sensitive workloads.

Patch Information

The maintainers resolved the issue in Cilium v1.15.15, v1.16.8, and v1.17.2. Full technical details are documented in the GitHub Security Advisory GHSA-24qp-4xx8-3jvj and the corresponding Cilium Proxy Pull Request #1172. Refer to the Cilium Documentation on LB IPAM for context on affected LoadBalancer provisioning.

Workarounds

  • Deploy a CiliumClusterwideNetworkPolicy that explicitly denies egress from restricted namespaces to the Gateway API LoadBalancer IP ranges.
  • Restrict Gateway API usage to namespaces where cross-namespace egress is already permitted by policy.
  • For clusters that cannot upgrade immediately, isolate Gateway LoadBalancer IPs into dedicated LB-IPAM pools covered by explicit deny rules.
bash
# Example Clusterwide Cilium Network Policy workaround pattern
# Apply using: kubectl apply -f ccnp-block-gateway-lb.yaml
apiVersion: cilium.io/v2
kind: CiliumClusterwideNetworkPolicy
metadata:
  name: block-gateway-lb-egress
spec:
  endpointSelector:
    matchLabels:
      k8s:io.kubernetes.pod.namespace: restricted-ns
  egressDeny:
    - toCIDR:
        - 203.0.113.0/24   # replace with Gateway LB-IPAM pool

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.