Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cheroot is vulnerable to request smuggling via multiple Content-Length headers #737

Open
1 of 3 tasks
kenballus opened this issue Jan 2, 2025 · 1 comment
Open
1 of 3 tasks
Labels
bug Something is broken triage

Comments

@kenballus
Copy link

❓ I'm submitting a ...

  • 🐞 bug report
  • 🐣 feature request
  • ❓ question about the decisions made in the repository

🐞 Describe the bug. What is the current behavior?
Cheroot accepts requests with multiple Content-Length headers, prioritizing the second. It is therefore vulnerable to request smuggling when paired with a gateway server that forwards requests with multiple Content-Length headers, prioritizing the first.

❓ What is the motivation / use case for changing the behavior?
This is a vulnerability.

I reported this privately through the official channel on June 8th, 2024, but received no response.

πŸ’‘ To Reproduce

  1. Start a cheroot-based web server.
  2. Send it an otherwise valid request with multiple Content-Length headers.
  3. Watch it prioritize the second header over the first.

πŸ’‘ Expected behavior

The request should be rejected with status 400.

πŸ“‹ Environment

  • Cheroot version: main branch, commit 088647e
  • Python version: Python 3.14.0a3+
  • OS: Linux 8a89c2a1a5fb 6.1.0-25-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.106-3 (2024-08-26) x86_64 GNU/Linux
@kenballus kenballus added bug Something is broken triage labels Jan 2, 2025
@webknjaz
Copy link
Member

webknjaz commented Jan 3, 2025

Yes, I can see the reports. Haven't had a chance to triage them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken triage
Projects
None yet
Development

No branches or pull requests

2 participants