Vulnérabilité dans cowlib (CVE-2026-7790)
Résumé
Vulnérabilité dans cowlib (CVE-2026-7790). Risque d'opérations non autorisées ou de divulgation. Atténuation : mise à jour vers 2.16.1 ou plus.
Description d'origine
La description telle que publiée par la source (souvent en anglais).
Summary
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.
Workarounds
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.
Source: NIST National Vulnerability Database NVD GitHub Advisory
Résumé généré automatiquement
Assemblé par SecPulse à partir des données sources (CVSS, CWE, versions affectées) à l'aide de modèles, sans IA. Vérifiez la description d'origine et les références ci-dessous.
Une vulnérabilité référencée CVE-2026-7790 a été découverte dans cowlib.
Risque d'opérations non autorisées ou de divulgation.
Action : mettez à jour cowlib vers 2.16.1 ou supérieur.
En cas de doute, contactez votre service informatique ou cherchez « cowlib CVE-2026-7790 » sur le site de l'éditeur.
CVE-2026-7790 (cowlib) — CWE-400
Correctif : 2.16.1 — appliquer immédiatement
Contournement : 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.
Plan : 1) Audit SBOM, 2) Mise à jour staging→prod, 3) Surveillance WAF/proxy sur les endpoints affectés, 4) Recherche d'IOC dans les logs.
Réfs : voir GHSA / avis éditeur / version corrigée liés sur cette page.
Une vulnérabilité (CWE-400) affecte cowlib.
Consultez l'avis de l'éditeur pour les versions affectées de cowlib.
Gravité : ?. Risque d'opérations non autorisées ou de divulgation.
Mettre à jour vers 2.16.1.
Contournement : 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.
Recherchez dans les logs des requêtes correspondant aux IOC connus de cette CVE. Auditez les SBOM/dépendances.
Actions de réponse
Étapes concrètes et exemples de commandes que les équipes SOC/SRE doivent exécuter dans l'ordre
-
1Identify exposure identify
grep -r 'cowlib' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
cowlibを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply temporary workaround mitigate
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.パッチが適用されるまでの応急処置として、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. を実施。回避策の副作用 (機能低下) を確認した上で。
-
3Apply patch patch
Upgrade cowlib to 2.16.1ステージング環境で 2.16.1 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
4Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Paquets affectés
État des correctifs par distribution
Paquets corrigés publiés par chaque distribution pour cette CVE
- Debian DEBIAN-CVE-2026-7790 erlang-cowlib
- Ubuntu UBUNTU-CVE-2026-7790 erlang-cowlib
Références
- advisory nvd.nist.gov
- package github.com
- package hex.pm
- patch github.com
- web cna.erlef.org
- web osv.dev
- web github.com
- web github.com