{"id":"CVE-2025-62504","summary":"Envoy Lua filter use-after-free when oversized rewritten response body causes crash","details":"Envoy is an open source edge and service proxy. Envoy versions earlier than 1.36.2, 1.35.6, 1.34.10, and 1.33.12 contain a use-after-free vulnerability in the Lua filter. When a Lua script executing in the response phase rewrites a response body so that its size exceeds the configured per_connection_buffer_limit_bytes (default 1MB), Envoy generates a local reply whose headers override the original response headers, leaving dangling references and causing a crash. This results in denial of service. Updating to versions 1.36.2, 1.35.6, 1.34.10, or 1.33.12 fixes the issue. Increasing per_connection_buffer_limit_bytes (and for HTTP/2 the initial_stream_window_size) or increasing per_request_buffer_limit_bytes / request_body_buffer_limit can reduce the likelihood of triggering the condition but does not correct the underlying memory safety flaw.","aliases":["BIT-envoy-2025-62504","GHSA-gcxr-6vrp-wff3"],"modified":"2026-08-12T15:14:25.162054Z","published":"2025-10-16T21:23:41.883Z","related":["openSUSE-SU-2025:15655-1"],"database_specific":{"cna_assigner":"GitHub_M","cwe_ids":["CWE-416"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/62xxx/CVE-2025-62504.json"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/62xxx/CVE-2025-62504.json"},{"type":"ADVISORY","url":"https://github.com/envoyproxy/envoy/security/advisories/GHSA-gcxr-6vrp-wff3"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-62504"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/envoyproxy/envoy","events":[{"introduced":"0"},{"fixed":"d602fb5d4af3ef3740621590e59187233398e0c0"},{"introduced":"d7809ba2b07fd869d49bfb122b27f6a7977b4d94"},{"fixed":"40ab4828a48f05103573ddee3c807dfa0e3e23f7"},{"introduced":"84305a6cb64bd55aaf606bdd53de7cd6080427a1"},{"fixed":"0d240c4b0f5b5db91ef14b1bf424520144b1a75d"},{"introduced":"63ee0dc79dce88117c6bd2df5a742f8eb67ea980"},{"fixed":"dc2d3098ae5641555f15c71d5bb5ce0060a8015c"}],"database_specific":{"cpe":"cpe:2.3:a:envoyproxy:envoy:*:*:*:*:*:*:*:*","extracted_events":[{"introduced":"0"},{"fixed":"1.33.12"},{"introduced":"1.34.0"},{"fixed":"1.34.10"},{"introduced":"1.35.0"},{"fixed":"1.35.6"},{"introduced":"1.36.0"},{"fixed":"1.36.2"}],"source":"CPE_RANGE"}}],"versions":["v1.36.1","v1.35.5","v1.33.11","v1.34.9","v1.36.0","v1.35.4","v1.34.8","v1.33.10","v1.33.9","v1.35.3","v1.34.7","v1.35.2","v1.33.8","v1.34.6","v1.34.5","v1.35.1","v1.33.7","v1.34.4","v1.33.6","v1.35.0","v1.34.3","v1.33.5","v1.34.2","v1.33.4","v1.33.3","v1.34.1","v1.34.0","v1.33.2","v1.33.1","v1.33.0","v1.32.0","v1.31.0","v1.30.0","v1.29.0","v1.28.0","v1.27.0","v1.26.0","v1.25.0","v1.24.0","v1.23.0","v1.22.0","v1.21.0","v1.20.0","v1.19.0","v1.18.2","v1.18.1","v1.18.0","v1.17.0","v1.16.0","v1.15.0","v1.14.0","v1.13.0","v1.12.0","v1.11.0","v1.10.0","v1.9.0","v1.8.0","v1.7.0","v1.6.0","v1.5.0","v1.4.0","v1.3.0","v1.2.0","v1.1.0","v1.0.0"],"database_specific":{"vanir_signatures":[{"target":{"file":"test/extensions/filters/http/lua/lua_integration_test.cc","function":"initializeAndSendRequest"},"deprecated":false,"digest":{"function_hash":"165642250652000326040510822155034200423","length":518},"id":"CVE-2025-62504-88355bc5","signature_type":"Function","signature_version":"v1","source":"https://github.com/envoyproxy/envoy/commit/d602fb5d4af3ef3740621590e59187233398e0c0"},{"deprecated":false,"digest":{"threshold":0.9,"line_hashes":["162488919370654621747968747814311909444","226810983615114271767370501606946940034","247158085973556930605318978211228881856","16464986695022144028157521654265706545","268562523828584306666449027530784370520","289331889019161617442261340445171339384","226755889304640551085226826470812298212","125556476522841732105641329883230102978","92782970941617784783877127396472631273","26342928292701913776309469656215839047","64802572305607210945017202571330832127","200311650960572541836036539434112614517","322558152584984203883389806220749756083","145995788222018242579128276155535689277","261354598300289774921753314927633111741","14201599612969965236895294738190866472"]},"id":"CVE-2025-62504-ab17abb2","signature_type":"Line","signature_version":"v1","source":"https://github.com/envoyproxy/envoy/commit/d602fb5d4af3ef3740621590e59187233398e0c0","target":{"file":"test/extensions/filters/http/lua/lua_integration_test.cc"}},{"source":"https://github.com/envoyproxy/envoy/commit/d602fb5d4af3ef3740621590e59187233398e0c0","target":{"file":"test/extensions/filters/http/lua/lua_integration_test.cc","function":"initializeFilter"},"deprecated":false,"digest":{"function_hash":"191732576676655761653032722877931014598","length":1785},"id":"CVE-2025-62504-fd5175a2","signature_type":"Function","signature_version":"v1"}],"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-62504.json","vanir_signatures_modified":"2026-08-12T15:14:25Z"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"}]}