Skip to content

Merge commit from fork#15611

Merged
normanmaurer merged 1 commit into4.2from
chunked42
Sep 3, 2025
Merged

Merge commit from fork#15611
normanmaurer merged 1 commit into4.2from
chunked42

Conversation

@normanmaurer
Copy link
Copy Markdown
Member

  • Prevent HTTP request/response smuggling via chunk encoding

Motivation:
Transfer-Encoding: chunked has some strict rules around parsing CR LF delimiters. If we are too lenient, it can cause request/response smuggling issues when combined with proxies that are lenient in different ways. See https://w4ke.info/2025/06/18/funky-chunks.html for the details.

Modification:

  • Make sure that we reject chunks with chunk-extensions that contain lone Line Feed octets without their preceding Carriage Return octet.
  • Make sure that we issue HttpContent objects with decoding failures, if we decode a chunk and it isn't immediately followed by a CR LF octet pair.

Result:
Smuggling requests/responses is no longer possible.

Fixes #15522

  • Enforce CR LF line separators for HTTP messages by default

But also make it configurable through HttpDecoderConfig, and add a system property opt-out to change the default back.

  • Remove property for the name of the strict line parsing property

  • Remove HeaderParser.parse overload that only takes a buffer argument

* Prevent HTTP request/response smuggling via chunk encoding

Motivation:
Transfer-Encoding: chunked has some strict rules around parsing CR LF delimiters.
If we are too lenient, it can cause request/response smuggling issues when combined with proxies that are lenient in different ways.
See https://w4ke.info/2025/06/18/funky-chunks.html for the details.

Modification:
- Make sure that we reject chunks with chunk-extensions that contain lone Line Feed octets without their preceding Carriage Return octet.
- Make sure that we issue HttpContent objects with decoding failures, if we decode a chunk and it isn't immediately followed by a CR LF octet pair.

Result:
Smuggling requests/responses is no longer possible.

Fixes #15522

* Enforce CR LF line separators for HTTP messages by default

But also make it configurable through `HttpDecoderConfig`, and add a system property opt-out to change the default back.

* Remove property for the name of the strict line parsing property

* Remove HeaderParser.parse overload that only takes a buffer argument
@normanmaurer normanmaurer added this to the 4.2.5.Final milestone Sep 3, 2025
@normanmaurer normanmaurer merged commit edb55fd into 4.2 Sep 3, 2025
3 checks passed
@normanmaurer normanmaurer deleted the chunked42 branch September 3, 2025 06:35
takeseem added a commit to takeseem/vertx-web that referenced this pull request Sep 14, 2025
Adapt to Netty 4.2.5 strict rules for CRLF delimiters:
netty/netty#15611
takeseem added a commit to takeseem/vertx-web that referenced this pull request Sep 14, 2025
Adapt to Netty 4.2.5 strict rules for CRLF delimiters:
netty/netty#15611
@bastien-roucaries
Copy link
Copy Markdown

Can you confirm it is CVE-2025-58056 and what are the commit fixing for 4.1 ?

@chrisvest
Copy link
Copy Markdown
Member

@bastien-roucaries it is

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.

0-Day Request Smuggling Vulnerability in Netty

3 participants