Skip to content

fix(security): harden Puma against HTTP Request Smuggling (CVE)#86

Open
AjayPAnand wants to merge 1 commit intothoth-tech:10.0.xfrom
AjayPAnand:10.0.x
Open

fix(security): harden Puma against HTTP Request Smuggling (CVE)#86
AjayPAnand wants to merge 1 commit intothoth-tech:10.0.xfrom
AjayPAnand:10.0.x

Conversation

@AjayPAnand
Copy link
Copy Markdown

@AjayPAnand AjayPAnand commented Apr 4, 2026

  • Bump Puma to >= 6.4.3 in Gemfile for hardened HTTP parsing
  • Add raise_exception_on_sigterm! to config/puma.rb to prevent request queue poisoning on SIGTERM

Severity: SIGNIFICANT
Ref: FIX 2 — HTTP Request Smuggling

Description

This PR addresses a significant security vulnerability, HTTP Request Smuggling - by hardening the Puma web server configuration in the doubtfire-api service.
HTTP Request Smuggling occurs when a front-end proxy (e.g. Nginx) and a back-end server (Puma) disagree on where one HTTP request ends and the next begins. Attackers can exploit this to poison request queues, bypass access controls, hijack sessions, or perform cache poisoning.
Changes made:

Bumped Puma to >= 6.4.3 in Gemfile - this version includes hardened HTTP/1.1 request parsing that rejects ambiguous Content-Length / Transfer-Encoding header combinations used in smuggling attacks
Added raise_exception_on_sigterm! to config/puma.rb; ensures Puma raises an exception on SIGTERM rather than draining its queue, preventing in-flight poisoned requests from being processed during graceful shutdown

Type of change

Bug fix (non-breaking change which fixes an issue)

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

The configuration changes were verified as follows:

  • Test A - Confirmed Puma starts successfully with the new puma.rb settings in the development environment (rails server / puma -C config/puma.rb) with no errors or warnings

  • Test B - Confirmed bundle update puma resolves to a version >= 6.4.3 and bundle install completes without dependency conflicts

To reproduce: Run bundle exec puma -C config/puma.rb and verify the server starts cleanly. Check bundle list | grep puma to confirm the resolved version.

Checklist:

  • My code follows the style guidelines of this project

  • I have performed a self-review of my own code

  • I have commented my code, particularly in hard-to-understand areas

  • I have made corresponding changes to the documentation if appropriate

  • My changes generate no new warnings

  • New and existing unit tests pass locally with my changes

  • Any dependent changes have been merged and published in downstream modules

- Bump Puma to >= 6.4.3 in Gemfile for hardened HTTP parsing
- Add raise_exception_on_sigterm! to config/puma.rb to prevent
  request queue poisoning on SIGTERM

Severity: SIGNIFICANT
Ref: FIX 2 — HTTP Request Smuggling
@AjayPAnand AjayPAnand marked this pull request as ready for review April 4, 2026 03:41
@AjayPAnand AjayPAnand marked this pull request as draft April 4, 2026 03:41
@AjayPAnand AjayPAnand marked this pull request as ready for review April 5, 2026 10:36
@AjayPAnand
Copy link
Copy Markdown
Author

Before fix:

62  HTTP Request Smuggling_Not fixed

After fix:

HTTP Smuggling fixed

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.

1 participant