CVE-2024-42487: Gateway API route matching order contradicts specification
4
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.28533%
CWE
Published
8/15/2024
Updated
9/30/2024
KEV Status
No
Technology
Go
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:N/A:N
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| github.com/cilium/cilium | go | = 1.16.0 | 1.16.1 |
| github.com/cilium/cilium | go | >= 1.15.0, < 1.15.8 | 1.15.8 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the route sorting logic in SortableRoute.Less() which determines match precedence. The commit diff shows the fix added method matching checks (via getMethod) before header matching checks in the sorting algorithm. The original implementation without this method check caused routes with header matches to be prioritized over method matches, violating the spec's requirement that method matching should precede header matching. The test changes in envoy_virtual_host_test.go demonstrate how method-based routes now get higher priority in the sorted order. The function's role in determining routing precedence and the direct modification to insert method checks make it clearly vulnerable.