Difference between revisions of "OWASP Periodic Table of Vulnerabilities - HTTP Request/Response Smuggling"

From OWASP
Jump to: navigation, search
m
(One intermediate revision by one user not shown)
Line 11: Line 11:
  
 
* Sanitize all HTTP headers, especially duplicates, by enforcing strict adherence to RFC
 
* Sanitize all HTTP headers, especially duplicates, by enforcing strict adherence to RFC
** Sanitize both HTTP requests and responses
+
* Sanitize both HTTP requests and response bodies, ensuring exact correspondence between Content-Length headers and body lengths
 
* Avoid HTTP connection sharing
 
* Avoid HTTP connection sharing
 
* Enforce SSL to prevent proxy tampering
 
* Enforce SSL to prevent proxy tampering
 +
* Provide configuration option to silently sanitize malformed data or return a 5XX error response
  
 
=== Generic Framework Solution ===
 
=== Generic Framework Solution ===

Revision as of 16:21, 20 July 2013

Contents

HTTP Request/Response Smuggling

Root Cause Summary

Malformed HTTP requests and responses are interpreted differently by proxies, web servers, or other systems which process HTTP along the request/response path. This can allow a request or response to bypass proxy filters or rules, poison caches, or cause the response from one request to be incorrectly matched with another.

Browser / Standards Solution

Tighten RFC standards to describe precise behavior for malformed request/response data, including rules for handling duplicate headers.

Perimeter Solution

  • Sanitize all HTTP headers, especially duplicates, by enforcing strict adherence to RFC
  • Sanitize both HTTP requests and response bodies, ensuring exact correspondence between Content-Length headers and body lengths
  • Avoid HTTP connection sharing
  • Enforce SSL to prevent proxy tampering
  • Provide configuration option to silently sanitize malformed data or return a 5XX error response

Generic Framework Solution

None

Custom Framework Solution

None

Custom Code Solution

None

Discussion / Controversy

Framework-level solutions for enforcing correct CRLF behavior and preventing header manipulation are addressed by OWASP Periodic Table of Vulnerabilities - HTTP Response Splitting.

References

HTTP Request Smuggling
HTTP Message Splitting, Smuggling and Other Animals (Amit Klein, OWASP)
Message Header Extensions (RFC)
Response Smuggling (WASC)