CVE-2017-7657

9.8 CRITICAL

📋 TL;DR

This vulnerability in Eclipse Jetty allows attackers to bypass authorization controls by exploiting an integer overflow in chunk length parsing. When Jetty is deployed behind an intermediary proxy with authorization, specially crafted HTTP requests can be interpreted as pipelined requests to bypass security checks. Affects Jetty versions 9.2.x and older, 9.3.x, and 9.4.x with RFC2616 compliance enabled.

💻 Affected Systems

Products:
  • Eclipse Jetty
Versions: 9.2.x and older, 9.3.x (all configurations), 9.4.x (non-default configuration with RFC2616 compliance enabled)
Operating Systems: All operating systems running affected Jetty versions
Default Config Vulnerable: ✅ No
Notes: Only vulnerable in 9.4.x when RFC2616 compliance is explicitly enabled (non-default configuration). 9.2.x and 9.3.x are vulnerable in all configurations.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete authorization bypass allowing unauthorized access to protected resources, potentially leading to data theft, privilege escalation, or system compromise.

🟠

Likely Case

Bypass of proxy-level authorization controls, allowing attackers to access restricted endpoints or services that should be protected.

🟢

If Mitigated

Limited impact if Jetty is not behind an authorization proxy or if proper input validation and size limits are enforced.

🌐 Internet-Facing: HIGH - Internet-facing Jetty servers behind authorization proxies are directly exploitable by remote attackers.
🏢 Internal Only: MEDIUM - Internal systems could be exploited by authenticated attackers or through lateral movement.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires Jetty to be behind an authorization proxy and the ability to send HTTP requests with malicious chunk sizes.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Jetty 9.2.25.v20180606, 9.3.24.v20180605, 9.4.9.v20180320

Vendor Advisory: https://bugs.eclipse.org/bugs/show_bug.cgi?id=535668

Restart Required: Yes

Instructions:

1. Identify current Jetty version. 2. Upgrade to patched version: 9.2.25+, 9.3.24+, or 9.4.9+. 3. Restart Jetty service. 4. Verify fix by testing with known exploit payloads.

🔧 Temporary Workarounds

Disable RFC2616 Compliance

all

For Jetty 9.4.x, disable RFC2616 compliance mode which is required for exploitation in this version.

Set 'org.eclipse.jetty.http.HttpCompliance.RFC2616' to false in jetty configuration

Configure Proxy Chunk Limits

all

Configure upstream proxies to limit maximum chunk size to prevent integer overflow.

nginx: client_max_body_size 10m;
apache: LimitRequestBody 10485760

🧯 If You Can't Patch

  • Deploy Web Application Firewall (WAF) with rules to detect and block malicious chunked transfer encoding
  • Implement network segmentation to isolate vulnerable Jetty instances from untrusted networks

🔍 How to Verify

Check if Vulnerable:

Check Jetty version and configuration. For 9.4.x, verify if RFC2616 compliance is enabled.

Check Version:

java -jar jetty-distribution-*.jar --version or check server startup logs

Verify Fix Applied:

Test with proof-of-concept exploit payloads after patching to confirm they are blocked.

📡 Detection & Monitoring

Log Indicators:

  • Unusual chunk size values in HTTP logs
  • Requests with abnormally large Content-Length or Transfer-Encoding headers
  • Failed authorization attempts followed by successful requests

Network Indicators:

  • HTTP requests with chunk sizes near integer overflow limits (2^31-1)
  • Multiple requests pipelined in single connection

SIEM Query:

source="jetty.log" AND ("Transfer-Encoding: chunked" AND content_length>1000000000) OR ("RFC2616" AND "enabled")

🔗 References

📤 Share & Export