Skip to content

Gateway API route matching order contradicts specification

Moderate severity GitHub Reviewed Published Aug 15, 2024 in cilium/cilium • Updated Sep 30, 2024

Package

gomod github.com/cilium/cilium (Go)

Affected versions

= 1.16.0
>= 1.15.0, < 1.15.8

Patched versions

1.16.1
1.15.8

Description

Impact

Gateway API HTTPRoutes and GRPCRoutes do not follow the match precedence specified in the Gateway API specification. In particular, request headers are matched before request methods, when the specification describes that the request methods must be respected before headers are matched (HTTPRouteRule, GRPCRouteRule).

If users create Gateway API resources that use both request headers and request methods in order to route to different destinations, then traffic may be delivered to the incorrect backend. If the backend does not have Network Policy restricting acceptable traffic to receive, then requests may access information that you did not intend for them to access.

Patches

This issue was fixed in cilium/cilium#34109.

This issue affects:

  • Cilium v1.15 between v1.15.0 and v1.15.7 inclusive
  • Cilium v1.16.0

This issue is fixed in:

  • Cilium v1.15.8
  • Cilium v1.16.1

Workarounds

There is no workaround for this issue.

Acknowledgements

The Cilium community has worked together with members of Cure53 and Isovalent to prepare these mitigations. Special thanks to @sayboras for remediating this issue.

Further 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 [email protected]. This is a private mailing list for the Cilium security team, and your report will be treated as top priority.

References

@ferozsalam ferozsalam published to cilium/cilium Aug 15, 2024
Published by the National Vulnerability Database Aug 15, 2024
Published to the GitHub Advisory Database Aug 15, 2024
Reviewed Aug 15, 2024
Last updated Sep 30, 2024

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
None
Scope
Changed
Confidentiality
Low
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:N/A:N

EPSS score

0.053%
(22nd percentile)

CVE ID

CVE-2024-42487

GHSA ID

GHSA-qcm3-7879-xcww

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.