CVE-2024-39305 Envoy Proxy use after free when route hash policy is configured with cookie attributes
Attackers can trigger memory disclosure or crashes in Envoy Proxy when route hash policies use cookie attributes, requiring an upgrade to patched versions.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-39305?
CVE-2024-39305 is a medium-severity use after free vulnerability in Envoyproxy Envoy, published on 1 Jul 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Envoy is a cloud-native, open source edge and service proxy. Prior to versions 1.30.4, 1.29.7, 1.28.5, and 1.27.7. Envoy references already freed memory when route hash policy is configured with cookie attributes. Note that this vulnerability has been fixed in the open as the effect would be immediately apparent if it was configured. Memory allocated for holding attribute values is freed after configuration was parsed. During request processing Envoy will attempt to copy content of de-allocated memory into request cookie header. This can lead to arbitrary content of Envoy's memory to be sent to the upstream service or abnormal process termination. This vulnerability is fixed in Envoy versions v1.30.4, v1.29.7, v1.28.5, and v1.27.7. As a workaround, do not use cookie attributes in route action hash policy.
Weakness: CWE-416
Which versions are affected by CVE-2024-39305?
1 open source package ship an affected version, including envoy. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
envoy Bitnami | All versions | 1.27.7, 1.28.5, 1.29.7, 1.30.4 |
Products include Envoyproxy Envoy.
How do I fix CVE-2024-39305?
Upgrade envoy to a fixed version for your release line: 1.27.7, 1.28.5, 1.29.7 or 1.30.4.
Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.
Is CVE-2024-39305 being exploited?
There is no known exploitation of CVE-2024-39305 in the wild and no public exploit code.
Other vulnerabilities in Envoyproxy Envoy
Sources
Also known as BIT-envoy-2024-39305, GHSA-fp35-g349-h66f.