5.8medium
Layer 7 policy enforcement may not occur in policies with wildcarded port ranges in Cilium
- Severity
- 5.8medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.52% (higher than 45% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-xg58-75qf-9r67BIT-CILIUM-2024-52529BIT-CILIUM-OPERATOR-2024-52529BIT-HUBBLE-RELAY-2024-52529GO-2024-3290
Description
Cilium is a networking, observability, and security solution with an eBPF-based dataplane. For users with the following configuration: 1. An allow policy that selects a Layer 3 destination and a port range `AND` 2. A Layer 7 allow policy that selects a specific port within the first policy's range the Layer 7 enforcement would not occur for the traffic selected by the Layer 7 policy. This issue only affects users who use Cilium's port range functionality, which was introduced in Cilium v1.16. This issue is patched in PR #35150. This issue affects Cilium v1.16 between v1.16.0 and v1.16.3 inclusive. This issue is patched in Cilium v1.16.4. Users are advised to upgrade. Users with network policies that match the pattern described above can work around the issue by rewriting any policies that use port ranges to individually specify the ports permitted for traffic.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| cilium cilium | >= 1.16.0, < 1.16.4, from 1.16.0 before 1.16.4 | CVE List, NVD |
| github.com/cilium/cilium (Go) | from 1.16.0 before 1.16.4 | GitHub Advisory Database, Go Vulnerability Database |
| cilium (Bitnami) | from 1.16.0 before 1.16.4 | Bitnami Vulnerability Database |
| cilium-operator (Bitnami) | from 1.16.0 before 1.16.4 | Bitnami Vulnerability Database |
| hubble-relay (Bitnami) | from 1.16.0 before 1.16.4 | Bitnami Vulnerability Database |
All scores
| GitHub_M | 5.8medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N |
| GitHub | 5.8medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:L/SI:N/SA:N |
| NVD | 5.8medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N |
| Bitnami Vulnerability Database | medium rating |
Classification
What each source says
CVE List
Cilium is a networking, observability, and security solution with an eBPF-based dataplane. For users with the following configuration: 1. An allow policy that selects a Layer 3 destination and a port range `AND` 2. A Layer 7 allow policy that selects a specific port within the first policy's range the Layer 7 enforcement would not occur for the traffic selected by the Layer 7 policy. This issue only affects users who use Cilium's port range functionality, which was introduced in Cilium v1.16. This issue is patched in PR #35150. This issue affects Cilium v1.16 between v1.16.0 and v1.16.3 inclusive. This issue is patched in Cilium v1.16.4. Users are advised to upgrade. Users with network policies that match the pattern described above can work around the issue by rewriting any policies that use port ranges to individually specify the ports permitted for traffic.
GitHub Advisory Database
Impact
For users with the following configuration:
- An allow policy that selects a Layer 3 identity and a port range AND
- A Layer 7 allow policy that selects a specific port within the first policy's range
then Layer 7 enforcement would not occur for the traffic selected by the Layer 7 policy.
This issue only affects users who use Cilium's port range functionality, which was introduced in Cilium v1.16.
For reference, an example of a pair of policies that would trigger this issue is:
apiVersion: "cilium.io/v2"
kind: CiliumNetworkPolicy
metadata:
name: "layer-3-and-4"
spec:
endpointSelector:
matchLabels:
app: service
ingress:
- fromCIDR:
- 192.168.60.0/24
toPorts:
- ports:
- port: "80"
endPort: 444
protocol: TCP
and
apiVersion: "cilium.io/v2"
kind: CiliumNetworkPolicy
metadata:
name: "layer-4-and-7"
spec:
endpointSelector:
matchLabels:
app: service
ingress:
toPorts:
- ports:
- port: "80"
protocol: TCP
rules:
http:
- method: "GET"
path: "/public"
In the above example, requests would be permitted to all HTTP paths on matching endpoints, rather than just GET requests to the /public path as intended by the layer-4-and-7 policy. In patched versions of Cilium, the layer-4-and-7 rule would take precedence over the layer-3-and-4 rule.
Patches
This issue is patched in https://github.com/cilium/cilium/pull/35150.
This issue affects Cilium v1.16 between v1.16.0 and v1.16.3 inclusive.
This issue is patched in Cilium v1.16.4.
Workarounds
Users with network policies that match the pattern described above can work around the issue by rewriting any policies that use port ranges to individually specify the ports permitted for traffic.
Acknowledgements
The Cilium community has worked together with members of Isovalent to prepare these mitigations. Special thanks to @jrajahalme for resolving this issue.
For more information
If you have any questions or comments about this advisory, please reach out on Slack.
If you think you have found a vulnerability affecting Cilium, we strongly encourage you to report it to our security mailing list at security@cilium.io. This is a private mailing list for the Cilium security team, and your report will be treated as top priority.
Go Vulnerability Database
Cilium's Layer 7 policy enforcement may not occur in policies with wildcarded port ranges in github.com/cilium/cilium
NVD (es)
Cilium es una solución de redes, observabilidad y seguridad con un plano de datos basado en eBPF. Para los usuarios con la siguiente configuración: 1. Una política de permiso que selecciona un destino de Capa 3 y un rango de puertos `AND` 2. Una política de permiso de Capa 7 que selecciona un puerto específico dentro del rango de la primera política, la aplicación de Capa 7 no se produciría para el tráfico seleccionado por la política de Capa 7. Este problema solo afecta a los usuarios que utilizan la funcionalidad de rango de puertos de Cilium, que se introdujo en Cilium v1.16. Este problema está corregido en PR #35150. Este problema afecta a Cilium v1.16 entre v1.16.0 y v1.16.3 inclusive. Este problema está corregido en Cilium v1.16.4. Se recomienda a los usuarios que actualicen. Los usuarios con políticas de red que coincidan con el patrón descrito anteriormente pueden solucionar el problema reescribiendo cualquier política que utilice rangos de puertos para especificar individualmente los puertos permitidos para el tráfico.
References
| https://github.com/cilium/cilium/security/advisories/GHSA-xg58-75qf-9r67 | advisory, patch, third-party-advisory, web | |
| https://github.com/cilium/cilium/pull/35150 | fix, patch, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2024-52529 | advisory, web | |
| https://github.com/cilium/cilium | package | |
Related
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-52529 changed 2024-11-26 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-xg58-75qf-9r67 changed 2026-09-10 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2024-3290 changed 2026-02-04 | CC-BY-4.0 |
| NVD | CVE-2024-52529 changed 2026-06-17 | Public domain |
| Bitnami Vulnerability Database | BIT-CILIUM-2024-52529 changed 2026-09-08 | Apache-2.0 |
| Bitnami Vulnerability Database | BIT-CILIUM-OPERATOR-2024-52529 changed 2026-09-08 | Apache-2.0 |
| Bitnami Vulnerability Database | BIT-HUBBLE-RELAY-2024-52529 changed 2026-09-08 | Apache-2.0 |