Kuboid
Open Luck·Kuboid.in

HTTP/1.1 Must Die: The Desync Endgame

DEFCONConference5,530 views36:316 months ago

This talk explores advanced HTTP Request Smuggling (HRS) techniques, specifically focusing on desync attacks that exploit parser discrepancies between front-end and back-end servers. The research demonstrates how modern infrastructure, including CDNs and load balancers, remains vulnerable to these attacks despite previous mitigation efforts. The speaker introduces new exploitation strategies, such as 0-Content-Length (0.CL) and expect-based desync, and provides practical guidance for identifying and testing these vulnerabilities in complex, multi-tier environments.

HTTP/1.1 Request Smuggling Is Not Dead: The 0.CL and Expect-Based Endgame

TLDR: Despite the industry shift toward HTTP/2, HTTP/1.1 remains the primary protocol for back-end communication, leaving massive infrastructure vulnerable to desync attacks. This research demonstrates that modern CDNs and load balancers are still susceptible to 0-Content-Length (0.CL) and expect-based smuggling techniques. Pentesters should prioritize testing these parser discrepancies in multi-tier environments to bypass security controls and achieve full site takeover.

HTTP/1.1 is the cockroach of the web. We keep trying to kill it with HTTP/2 and HTTP/3, but it persists in the shadows of our infrastructure, specifically in the communication between front-end load balancers and back-end application servers. While most developers focus on securing the client-to-front-end connection, the real danger lies in the "upstream" connection. If you are still relying on the assumption that your front-end proxy perfectly sanitizes requests before passing them to the back-end, you are likely sitting on a critical vulnerability.

The Persistence of Parser Discrepancies

The core of the issue is that different components in a request chain often disagree on where one request ends and the next begins. When a front-end proxy and a back-end server use different logic to parse headers like Content-Length or Transfer-Encoding, an attacker can inject a second, "smuggled" request that the back-end processes as part of the first.

This is not just a theoretical bug. It is a fundamental flaw in how we handle state in distributed systems. Even with modern, hardened infrastructure, the sheer variety of implementations means that finding a parser discrepancy is often just a matter of finding the right combination of headers.

0.CL and Expect-Based Smuggling

The most effective techniques currently involve exploiting how servers handle requests with zero content length or specific header combinations. A 0.CL (zero content length) attack forces the front-end to treat a request as having no body, while the back-end, perhaps due to a different parser implementation, waits for data or misinterprets the subsequent request on the same connection.

The "Expect" header provides another vector. By sending an Expect: 100-continue header, an attacker can manipulate the server's response flow. If the back-end is configured to handle this header differently than the front-end, you can trigger a race condition or force the back-end to process a smuggled request that was never intended to reach it.

Consider this basic payload structure for testing:

POST / HTTP/1.1
Host: target.com
Expect: 100-continue
Content-Length: 0

GET /admin HTTP/1.1
Host: target.com

If the front-end sees the Content-Length: 0 and ignores the rest, but the back-end sees the Expect header and keeps the connection open to read the "rest" of the request, your GET /admin request is now being processed by the back-end as if it came from the same authenticated session as the POST.

Real-World Impact and Engagement Strategy

During a penetration test, you should not assume that a "clean" scan means the target is secure. Automated scanners often miss these vulnerabilities because they rely on specific, well-known patterns. You need to manually probe for discrepancies.

Start by mapping the request chain. Identify the front-end proxy (e.g., Cloudflare, AWS ALB, Nginx) and the back-end technology (e.g., IIS, Apache, Node.js). Use Turbo Intruder to send high-concurrency requests with varying header permutations. Look for "Mystery 400" errors or unexpected 503 responses, which are often indicators that the back-end is struggling to parse your malformed input.

The impact is severe. In many cases, you can achieve Web Cache Poisoning by smuggling a request that forces the cache to store a malicious response. In other scenarios, you can hijack other users' sessions or gain unauthorized access to internal administrative endpoints that are protected by the front-end but exposed on the back-end. This is a classic example of A05:2021 – Security Misconfiguration that leads directly to A03:2021 – Injection.

Defensive Realities

Defending against these attacks is notoriously difficult because it requires perfect synchronization between every hop in your infrastructure. The most effective mitigation is to disable upstream connection reuse entirely, though this often comes with a significant performance penalty. If you must use connection reuse, ensure that your front-end and back-end are using the same, strictly compliant HTTP parser.

For those managing cloud-native environments, keep an eye on vendor-specific advisories like CVE-2025-4366. These entries often highlight specific parser bugs that, while patched in one version, may still exist in custom configurations or legacy middleware.

Stop trusting your internal headers. If your architecture relies on the front-end to strip or add headers before passing the request to the back-end, you are building on sand. The only way to truly secure these systems is to treat every internal request as potentially malicious and implement strict validation at every single layer of the stack. If you are not actively hunting for these discrepancies in your own environment, you are leaving the door wide open for anyone who knows how to manipulate the protocol.

Talk Type
research presentation
Difficulty
advanced
Category
web security
Has Demo Has Code Tool Released


DEF CON 33 Main Stage Talks

98 talks · 2025
Browse conference →
Premium Security Audit

We break your app before they do.

Professional penetration testing and vulnerability assessments by the Kuboid Secure Layer team. Securing your infrastructure at every layer.

Get in Touch
Official Security Partner
kuboid.in