Skip to content

Conversation

@mcollina
Copy link
Member

@mcollina mcollina commented Jan 6, 2026

No description provided.

…e exhaustion

A malicious server could send responses with thousands of Content-Encoding
layers, causing high CPU usage and memory allocation when creating decompressors.

This fix limits the number of content-encodings to 5, matching the approach
used by urllib3 (GHSA-gm62-xv2j-4w53), curl (CVE-2022-32206), and the recent
fix in lib/web/fetch/index.js.

Fixes CWE-770: Allocation of Resources Without Limits or Throttling

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Matteo Collina <hello@matteocollina.com>
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.87%. Comparing base (2bcb77b) to head (8da279a).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4729      +/-   ##
==========================================
+ Coverage   92.86%   92.87%   +0.01%     
==========================================
  Files         109      109              
  Lines       33818    33826       +8     
==========================================
+ Hits        31404    31415      +11     
+ Misses       2414     2411       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mcollina mcollina merged commit b04e3cb into main Jan 6, 2026
36 of 38 checks passed
@github-actions github-actions bot mentioned this pull request Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants