{"id":"EEF-CVE-2026-54892","summary":"Plug: quadratic-time decoding of nested query/body parameters enables denial of service","details":"## Summary\n\nInefficient algorithmic complexity in Plug's nested-parameter decoder allows an unauthenticated remote attacker to cause denial of service. `Plug.Conn.Query.decode/4` (and `Plug.Conn.Query.decode_each/2`) parse query strings and `application/x-www-form-urlencoded` request bodies. When a key contains many bracketed segments such as `a[a][a][a]=1`, the decoder walks the brackets and, for each of the N levels, performs a map operation keyed on an ever-growing binary prefix of the key, hashing the full byte range at each step. The total decode cost is therefore quadratic in the number of nesting levels.\n\nWith the default `Plug.Parsers.URLENCODED` body limit of 1,000,000 bytes, a single request can carry roughly 333,000 nesting levels and saturate a BEAM scheduler for minutes. A small number of concurrent requests can saturate all schedulers and render a Plug-based server unresponsive. No authentication or knowledge of application routes is required.\n\nThis vulnerability is associated with program files `lib/plug/conn/query.ex` and program routines `Plug.Conn.Query.decode/4`, `Plug.Conn.Query.decode_each/2`, `Plug.Conn.Query.split_keys/6`, `Plug.Conn.Query.insert_keys/3`, and `Plug.Conn.Query.finalize_pointer/2`.\n\nThis issue affects plug: from 1.15.0 before 1.15.5, from 1.16.0 before 1.16.4, from 1.17.0 before 1.17.2, from 1.18.0 before 1.18.3, and from 1.19.0 before 1.19.3.","aliases":["CVE-2026-54892","GHSA-j43x-5hjq-rgxf"],"modified":"2026-11-25T17:23:14.061050545Z","published":"2026-06-23T12:31:12.629Z","database_specific":{"cpe_ids":["cpe:2.3:a:elixir-plug:plug:*:*:*:*:*:*:*:*"],"cwe_ids":["CWE-407"],"$schema":"https://cna.erlef.org/schemas/osv/record-0.1.0.json","capec_ids":["CAPEC-229"]},"references":[{"type":"ADVISORY","url":"https://github.com/elixir-plug/plug/security/advisories/GHSA-j43x-5hjq-rgxf"},{"type":"WEB","url":"https://cna.erlef.org/cves/CVE-2026-54892.html"},{"type":"WEB","url":"https://github.com/elixir-plug/plug/commit/712b875d3442c765d8d37e546ffd5ad9f8afcc55"},{"type":"FIX","url":"https://github.com/elixir-plug/plug/commit/9c5d37c440eaae92869eed7c014c47266744fadb"},{"type":"FIX","url":"https://github.com/elixir-plug/plug/commit/a61124aa625d819a218fb07f90afbac8aa85eb0e"},{"type":"FIX","url":"https://github.com/elixir-plug/plug/commit/b4aa8a0665ce2726a6d5af44467fb4f59595b107"},{"type":"FIX","url":"https://github.com/elixir-plug/plug/commit/c317d08fdcf96e17931f7419275b2b8c4bf3e951"},{"type":"FIX","url":"https://github.com/elixir-plug/plug/commit/d4e5568392a4b29e545b91e12e87d6098f976145"},{"type":"FIX","url":"https://github.com/elixir-plug/plug/commit/d737eb236f17e31a36290e39f9ef3cd86a1343bd"},{"type":"PACKAGE","url":"https://hex.pm/packages/plug"}],"affected":[{"package":{"name":"plug","ecosystem":"Hex","purl":"pkg:hex/plug"},"ranges":[{"type":"SEMVER","events":[{"introduced":"1.15.0"},{"fixed":"1.15.5"}]},{"type":"SEMVER","events":[{"introduced":"1.16.0"},{"fixed":"1.16.4"}]},{"type":"SEMVER","events":[{"introduced":"1.17.0"},{"fixed":"1.17.2"}]},{"type":"SEMVER","events":[{"introduced":"1.18.0"},{"fixed":"1.18.3"}]},{"type":"SEMVER","events":[{"introduced":"1.19.0"},{"fixed":"1.19.3"}]}],"versions":["1.15.0","1.15.1","1.15.2","1.15.3","1.15.4","1.16.0","1.16.1","1.16.2","1.16.3","1.17.0","1.17.1","1.18.0","1.18.1","1.18.2","1.19.0","1.19.1","1.19.2"],"ecosystem_specific":{"$schema":"https://cna.erlef.org/schemas/osv/affected-0.1.0.json","modules":["'Elixir.Plug.Conn.Query'"],"program_files":["lib/plug/conn/query.ex"],"program_routines":["'Elixir.Plug.Conn.Query':decode/4","'Elixir.Plug.Conn.Query':decode_each/2","'Elixir.Plug.Conn.Query':split_keys/6","'Elixir.Plug.Conn.Query':insert_keys/3","'Elixir.Plug.Conn.Query':finalize_pointer/2"]},"database_specific":{"program_files":["lib/plug/conn/query.ex"],"program_routines":["'Elixir.Plug.Conn.Query':decode/4","'Elixir.Plug.Conn.Query':decode_each/2","'Elixir.Plug.Conn.Query':split_keys/6","'Elixir.Plug.Conn.Query':insert_keys/3","'Elixir.Plug.Conn.Query':finalize_pointer/2"],"source":"https://cna.erlef.org/osv/EEF-CVE-2026-54892.json","$schema":"https://cna.erlef.org/schemas/osv/affected-0.1.0.json","modules":["'Elixir.Plug.Conn.Query'"]}},{"ranges":[{"type":"GIT","repo":"https://github.com/elixir-plug/plug","events":[{"introduced":"712b875d3442c765d8d37e546ffd5ad9f8afcc55"},{"fixed":"9c5d37c440eaae92869eed7c014c47266744fadb"},{"fixed":"a61124aa625d819a218fb07f90afbac8aa85eb0e"},{"fixed":"b4aa8a0665ce2726a6d5af44467fb4f59595b107"},{"fixed":"c317d08fdcf96e17931f7419275b2b8c4bf3e951"},{"fixed":"d4e5568392a4b29e545b91e12e87d6098f976145"},{"fixed":"d737eb236f17e31a36290e39f9ef3cd86a1343bd"}]}],"versions":["v1.15.4","v1.16.3","v1.17.1","v1.18.2","v1.19.2","v1.15.3","v1.16.2","v1.17.0","v1.18.1","v1.19.1","v1.19.0","v1.18.0","v1.16.1","v1.16.0","v1.15.2","v1.15.1","v1.15.0"],"database_specific":{"modules":["'Elixir.Plug.Conn.Query'"],"source":"https://cna.erlef.org/osv/EEF-CVE-2026-54892.json","program_files":["lib/plug/conn/query.ex"],"program_routines":["'Elixir.Plug.Conn.Query':decode/4","'Elixir.Plug.Conn.Query':decode_each/2","'Elixir.Plug.Conn.Query':split_keys/6","'Elixir.Plug.Conn.Query':insert_keys/3","'Elixir.Plug.Conn.Query':finalize_pointer/2"],"$schema":"https://cna.erlef.org/schemas/osv/affected-0.1.0.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","source":"CNA"}],"credits":[{"name":"Braidon Whatley","type":"FINDER"},{"name":"Jonatan Männchen / EEF","type":"ANALYST"},{"name":"José Valim","type":"REMEDIATION_DEVELOPER"}]}