# CVE-2026-54892: Plug: quadratic-time decoding of nested query/body parameters enables denial of service

> Unauthenticated attackers can cause denial of service in Plug-based servers by sending deeply nested query parameters that trigger quadratic-time decoding.

- **Severity:** High 8.7 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 23 Jun 2026
- **Updated:** 23 Jun 2026
- **Also known as:** EEF-CVE-2026-54892, GHSA-j43x-5hjq-rgxf

## What is CVE-2026-54892?

CVE-2026-54892 is a high-severity denial of service vulnerability in elixir-plug plug, published on 23 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Inefficient 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.

With 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.

This 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.

This issue affects plug from 1.15.0 before 1.15.5, 1.16.4, 1.17.2, 1.18.3, and 1.19.3.

Weakness: CWE-407 (Inefficient Algorithmic Complexity)

## Which versions are affected by CVE-2026-54892?

11 open source packages ship an affected version, including plug.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `plug` | Hex | From 1.15.0 | 1.15.5, 1.16.4, 1.17.2, 1.18.3, 1.19.3 |
| `plug` | Hex | From 1.15.0 | 1.15.5 |
| `plug` | Hex | From 1.15.0 | 1.15.5 |
| `plug` | Hex | From 1.16.0 | 1.16.4 |
| `plug` | Hex | From 1.16.0 | 1.16.4 |
| `plug` | Hex | From 1.17.0 | 1.17.2 |
| `plug` | Hex | From 1.17.0 | 1.17.2 |
| `plug` | Hex | From 1.18.0 | 1.18.3 |
| `plug` | Hex | From 1.18.0 | 1.18.3 |
| `plug` | Hex | From 1.19.0 | 1.19.3 |
| `plug` | Hex | From 1.19.0 | 1.19.3 |

## How do I fix CVE-2026-54892?

Upgrade plug to a fixed version for your release line: 1.15.5, 1.16.4, 1.17.2 or 1.18.3.

## Is CVE-2026-54892 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-54892 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-54892 and fix it if it is affected.

What it is: CVE-2026-54892 is a high-severity denial of service vulnerability in elixir-plug plug, published on 23 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-54892 exists.

Affected packages and fixed versions:
- plug (Hex): affected from 1.15.0; fixed in 1.15.5, 1.16.4, 1.17.2, 1.18.3, 1.19.3
- plug (Hex): affected from 1.15.0; fixed in 1.15.5
- plug (Hex): affected from 1.15.0; fixed in 1.15.5
- plug (Hex): affected from 1.16.0; fixed in 1.16.4
- plug (Hex): affected from 1.16.0; fixed in 1.16.4
- plug (Hex): affected from 1.17.0; fixed in 1.17.2
- plug (Hex): affected from 1.17.0; fixed in 1.17.2
- plug (Hex): affected from 1.18.0; fixed in 1.18.3
- plug (Hex): affected from 1.18.0; fixed in 1.18.3
- plug (Hex): affected from 1.19.0; fixed in 1.19.3
- plug (Hex): affected from 1.19.0; fixed in 1.19.3

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-54892/ (Markdown: https://insights.sbomify.com/CVE-2026-54892/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-54892
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-54892
- OSV: https://osv.dev/vulnerability/CVE-2026-54892

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-54892/
Summaries are generated and may contain mistakes; the official description above is the record.
