TE.CL Vulnerabilities
Overview
TE.CL vulnerabilities occur when:
Front-end (Reverse Proxy/WAF): Uses
Transfer-Encoding: chunkedBack-end (Web Server): Uses
Content-Length
This creates an opportunity to bypass WAFs and other security controls.
Burp Suite Configuration
β οΈ Critical Setup Required
Before testing TE.CL, configure Burp Repeater:
1. Disable Auto Content-Length Update
In Repeater, click Settings icon (βοΈ) next to Send button
Uncheck "Update Content-Length"
[Settings Icon] β β Update Content-Length2. Create Tab Group for Sequential Requests
Right-click request tab β Add tab to group β Create tab group
Add both test requests to the group
Click arrow next to Send β Send group in sequence (single connection)
This sends all requests via the same TCP connection - essential for TE.CL exploitation.
Foundation
The Core Concept
Consider this request:
Front-end Perspective (Uses TE)
The front-end parses chunked encoding:
Result: Complete request, forwards all bytes to back-end.
Back-end Perspective (Uses CL)
The back-end sees Content-Length: 3 and parses:
Leftover in TCP buffer:
These bytes become the beginning of the next request.
Attack Scenario
Step 1: Attacker Sends Smuggling Request
Step 2: Victim/Probe Request
TCP Stream Analysis
Front-end view (splits by chunked encoding):
Back-end view (splits by Content-Length):
Result
The back-end receives invalid request starting with HELLO β 400 Bad Request
Identification
Test Requests
Request 1 (Tab 1 - Smuggling):
Request 2 (Tab 2 - Probe):
Testing Procedure
Create tab group with both requests
Disable "Update Content-Length"
Select "Send group in sequence (single connection)"
Click Send
Confirmation
Request 1 Response: Normal (200 OK or expected response)
Request 2 Response:
If Request 2 shows this error β Vulnerable to TE.CL
WAF Bypass Exploitation
Scenario
WAF blocks requests containing
/adminin URLGoal: Access
/adminpanel
The Bypass Technique
Send requests that WAF sees as benign, but back-end interprets differently.
Exploit Requests
Request 1 (Smuggling):
Request 2 (Trigger):
Chunk Size Calculation
The chunk size 27 (hex) = 39 (decimal) bytes:
TCP Stream Analysis
WAF View (Uses TE)
WAF sees: Two requests to /404 β No blocking (no /admin in URLs)
Back-end View (Uses CL)
Back-end sees:
GET /404 β 404 response
GET /admin β Admin panel! β
Invalid request β error
Response Mapping
Request 1
GET /404
GET /404
404 Not Found
Request 2
GET /404
GET /admin
200 OK (Admin!)
The response to Request 2 contains the admin panel content!
Calculating Chunk Size
Method: Character Count
Write the smuggled request (without chunk size line)
Count all characters including
\r\nConvert decimal to hexadecimal
Example
Counting:
Total: 42 bytes = 0x2a in hex
Quick Method in Burp
Highlight the smuggled request text
Check character count at bottom of Burp
Use calculator: decimal β hex
Complete Attack Flow Diagram
TE.TE to TE.CL Conversion
Sometimes you need to obfuscate TE header to create TE.CL scenario:
Using Substring Match
The asdchunked obfuscation:
Front-end: May still parse as chunked (substring match)
Back-end: Ignores invalid TE, uses CL
Server Logs Evidence
When exploitation succeeds, back-end logs show:
Three requests logged, but only two were "sent".
Tips & Tricks
Content-Length Values
3
5\r\n (chunk size + CRLF)
4
27\r\n (two-digit chunk + CRLF)
Common Pitfalls
β Forgetting to disable "Update Content-Length"
β Not using single connection for requests
β Wrong chunk size calculation
β Missing trailing
\r\nafter smuggled request
Verification
Check if responses are swapped:
Request 1 gets Request 2's expected response
Request 2 gets smuggled request's response
Differences from CL.TE
Front-end uses
Content-Length
Transfer-Encoding
Back-end uses
Transfer-Encoding
Content-Length
Smuggled data location
After empty chunk
In chunk body
CL header manipulation
Set to include smuggled
Set to exclude smuggled
Common use case
Force user actions
WAF bypass
Lab Walkthrough Summary
Identify blocked endpoint (e.g.,
/adminreturns "Unauthorized")Configure Burp: Disable auto CL, create tab group
Test for TE.CL using POST + GET technique
Calculate chunk size for smuggled request
Craft two GET /404 requests with smuggled
/adminSend in sequence via single connection
Check Response 2 for admin panel content
References
Last updated