A vulnerability in Kong Gateway Enterprise and Kong AI Gateway involves incorrect route priority calculation when the route_match_calculation setting is set to original (the default) with the traditional_compatible or expressions router. This miscalculation can cause an unintended route to be selected, resulting in route-scoped authentication and authorization plugins not being executed as intended. Changing the route_match_calculation setting to strict resolves the issue.