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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 8.7
- **CVSS:** 8.7 (v4.0, CNA) `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`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Attack requirements: None; Privileges required: None; User interaction: None; Confidentiality impact: None; Integrity impact: None; Availability impact: High; Confidentiality impact on other systems: None; Integrity impact on other systems: None; Availability impact on other systems: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.80% (percentile 53, 2026-11-26)
- **CWE:** CWE-400
- **Published:** 2026-05-11T18:06:41.490Z
- **Modified:** 2026-11-20T06:17:41.330Z

## Who should check

- Anyone running ninenines cowlib \>= 0.6.0, \< 2.16.1
- Anyone running ninenines cowlib \>= 8c0e428b012c59f553a264f285ed89d36f791e3e, \< a4b8039ce8c93ab00867ef6b7e888822c09f4369

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

## Affected and fixed versions

- ninenines cowlib: \>= 0.6.0, \< 2.16.1 (cvelist)
- ninenines cowlib: \>= 8c0e428b012c59f553a264f285ed89d36f791e3e, \< a4b8039ce8c93ab00867ef6b7e888822c09f4369 (cvelist)

## Mitigation

- Upgrade cowlib to 2.16.1 or later.
- Vendor workaround: In Cowboy, setting initial\_stream\_flow\_size to a much lower value limits the amount of chunked body data that cowlib will parse in a single read, reducing the window of data an attacker can use to trigger the quadratic work. This does not fully eliminate the vulnerability but can significantly reduce its impact for some applications.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-7790. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-7790.md
Affected: ninenines cowlib >= 0.6.0, < 2.16.1; ninenines cowlib >= 8c0e428b012c59f553a264f285ed89d36f791e3e, < a4b8039ce8c93ab00867ef6b7e888822c09f4369
Fixed in: ninenines cowlib 2.16.1

Steps:
1. Search this machine and project for ninenines cowlib: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-7790 being exploited?

There is no confirmed exploitation: CVE-2026-7790 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.80% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-7790?

High: CVSS 8.7 (v4.0, scored by CNA). Remote, no login needed.

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

ninenines cowlib \>= 0.6.0, \< 2.16.1; ninenines cowlib \>= 8c0e428b012c59f553a264f285ed89d36f791e3e, \< a4b8039ce8c93ab00867ef6b7e888822c09f4369.

### Is there a fix for CVE-2026-7790?

Yes. Fixed in ninenines cowlib 2.16.1. Upgrade cowlib to 2.16.1 or later. Vendor workaround: In Cowboy, setting initial\_stream\_flow\_size to a much lower value limits the amount of chunked body data that cowlib will parse in a single read, reducing the window of data an attacker can use to trigger the quadratic work. This does not fully eliminate the vulnerability but can significantly reduce its impact for some applications.

### How do I check if I'm affected by CVE-2026-7790?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://github.com/ninenines/cowlib/commit/8c0e428b012c59f553a264f285ed89d36f791e3e>
- patch: <https://github.com/ninenines/cowlib/commit/a4b8039ce8c93ab00867ef6b7e888822c09f4369>
- other: <https://cna.erlef.org/cves/CVE-2026-7790.html>
- other: <https://osv.dev/vulnerability/EEF-CVE-2026-7790>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-7790>

HTML: <https://flawdb.com/CVE-2026-7790> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-7790>
