# CVE-2026-32873: ewe: Loop with Unreachable Exit Condition ('Infinite Loop')

> Remote attackers can cause a permanent CPU exhaustion denial of service in applications using this Gleam web server library by sending malformed chunked requests.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 20 Mar 2026
- **Updated:** 20 Mar 2026
- **Also known as:** GHSA-4w98-xf39-23gp

## What is CVE-2026-32873?

CVE-2026-32873 is a high-severity denial of service vulnerability in vshakitskiy ewe, published on 20 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

ewe is a Gleam web server. Versions 0.8.0 through 3.0.4 contain a bug in the handle_trailers function where rejected trailer headers (forbidden or undeclared) cause an infinite loop. When handle_trailers encounters such a trailer, three code paths (lines 520, 523, 526) recurse with the original buffer (rest) instead of advancing past the rejected header (Buffer(header_rest, 0)), causing decoder.decode_packet to re-parse the same header on every iteration. The resulting loop has no timeout or escape — the BEAM process permanently wedges at 100% CPU. Any application that calls ewe.read_body on chunked requests is affected, and this is exploitable by any unauthenticated remote client before control returns to application code, making an application-level workaround impossible. This issue is fixed in version 3.0.5.

Weakness: CWE-835 (Loop with Unreachable Exit Condition), CWE-825 (Expired Pointer Dereference)

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

2 open source packages ship an affected version, including ewe. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `ewe` | Hex | From 0.8.0 | 3.0.5 |
| `ewe` | Hex | From 0.8.0 | 3.0.5 |

Products: Vshakitskiy Ewe.

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

Upgrade ewe to 3.0.5 or later.

## Is CVE-2026-32873 being exploited?

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

## Other vulnerabilities in vshakitskiy ewe

- [CVE-2026-34715](https://insights.sbomify.com/CVE-2026-34715/): ewe Has Improper Neutralization of CRLF Sequences in HTTP Headers (HTTP Request/Response Splitting) (medium 5.3)
- [CVE-2026-32881](https://insights.sbomify.com/CVE-2026-32881/): ewe has an Overly Permissive List of Allowed Inputs (medium 5.3)

## Fix prompt for AI coding agents

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

What it is: CVE-2026-32873 is a high-severity denial of service vulnerability in vshakitskiy ewe, published on 20 Mar 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-32873 exists.

Affected packages and fixed versions:
- ewe (Hex): affected from 0.8.0; fixed in 3.0.5
- ewe (Hex): affected from 0.8.0; fixed in 3.0.5

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-32873/ (Markdown: https://insights.sbomify.com/CVE-2026-32873/index.md)
```

## Sources

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

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