Impact
AWS Load Balancer Controller is an open source Kubernetes controller that manages AWS Application Load Balancer (ALB) and Network Load Balancer resources using Kubernetes Gateway API objects. An issue exists where, under certain circumstances, conflicting HTTPRoute and GRPCRoute objects attached to a shared Gateway listener are assigned ALB listener rule priorities based on route kind rather than route specificity, allowing cross-namespace traffic interception.
Impact In AWS Load Balancer Controller versions that support both GRPCRoute and HTTPRoute objects on the same Gateway listener, the function responsible for sorting listener rules processed HTTPRoute-derived rules and GRPCRoute-derived rules independently, then placed all HTTPRoute rules before all GRPCRoute rules regardless of specificity. As a result, a catch-all HTTPRoute (e.g., PathPrefix /) would receive ALB listener rule priority 1 and be evaluated before a more specific GRPCRoute (e.g., /Service/Method), intercepting traffic intended for that GRPCRoute.
A user with permission to create or update HTTPRoute objects in their own namespace — with no cluster-admin or AWS credentials required — could create a catch-all HTTPRoute for a hostname served by another namespace's GRPCRoute on a shared Gateway. This would cause the catch-all HTTPRoute to intercept, spoof, or deny traffic intended for the victim namespace's gRPC service.
This issue requires the following preconditions:
A shared Gateway with AllowedRoutes.Namespaces.From set to All, or a namespace selector that includes both the affected and the other namespace.
The user has permission to create or update HTTPRoute objects only within their own namespace.
Impacted versions: <= v3.4.1
Patches
This issue has been addressed in AWS Load Balancer Controller version 3.4.2. We recommend upgrading to the latest version and ensuring any forked or derivative code is patched to incorporate the new fixes.
Ref: https://github.com/kubernetes-sigs/aws-load-balancer-controller/releases/tag/v3.4.2
Workarounds
Restrict the Gateway listener AllowedRoutes.Namespaces.From field to Same, or configure a restrictive namespace Selector, to prevent untrusted namespaces from attaching routes to a shared Gateway listener.
References
If you have any questions or comments about this advisory, we ask that you contact AWS Security via our vulnerability reporting page or directly via email to aws-security@amazon.com. Please do not create a public GitHub issue.
Acknowledgement
We would like to thank hakuopi for collaborating on this issue through the coordinated vulnerability disclosure process.
Impact
AWS Load Balancer Controller is an open source Kubernetes controller that manages AWS Application Load Balancer (ALB) and Network Load Balancer resources using Kubernetes Gateway API objects. An issue exists where, under certain circumstances, conflicting HTTPRoute and GRPCRoute objects attached to a shared Gateway listener are assigned ALB listener rule priorities based on route kind rather than route specificity, allowing cross-namespace traffic interception.
Impact In AWS Load Balancer Controller versions that support both GRPCRoute and HTTPRoute objects on the same Gateway listener, the function responsible for sorting listener rules processed HTTPRoute-derived rules and GRPCRoute-derived rules independently, then placed all HTTPRoute rules before all GRPCRoute rules regardless of specificity. As a result, a catch-all HTTPRoute (e.g., PathPrefix /) would receive ALB listener rule priority 1 and be evaluated before a more specific GRPCRoute (e.g., /Service/Method), intercepting traffic intended for that GRPCRoute.
A user with permission to create or update HTTPRoute objects in their own namespace — with no cluster-admin or AWS credentials required — could create a catch-all HTTPRoute for a hostname served by another namespace's GRPCRoute on a shared Gateway. This would cause the catch-all HTTPRoute to intercept, spoof, or deny traffic intended for the victim namespace's gRPC service.
This issue requires the following preconditions:
A shared Gateway with
AllowedRoutes.Namespaces.Fromset toAll, or a namespace selector that includes both the affected and the other namespace.The user has permission to create or update HTTPRoute objects only within their own namespace.
Impacted versions: <= v3.4.1
Patches
This issue has been addressed in AWS Load Balancer Controller version 3.4.2. We recommend upgrading to the latest version and ensuring any forked or derivative code is patched to incorporate the new fixes.
Ref: https://github.com/kubernetes-sigs/aws-load-balancer-controller/releases/tag/v3.4.2
Workarounds
Restrict the Gateway listener AllowedRoutes.Namespaces.From field to Same, or configure a restrictive namespace Selector, to prevent untrusted namespaces from attaching routes to a shared Gateway listener.
References
If you have any questions or comments about this advisory, we ask that you contact AWS Security via our vulnerability reporting page or directly via email to aws-security@amazon.com. Please do not create a public GitHub issue.
Acknowledgement
We would like to thank hakuopi for collaborating on this issue through the coordinated vulnerability disclosure process.