CVE-2022-31394
📋 TL;DR
This vulnerability in Hyperium Hyper HTTP libraries allows attackers to perform HTTP/2 attacks by exploiting the inability to customize max_header_list_size limits. It affects applications using Hyper versions before 0.14.19 that enable HTTP/2 functionality.
💻 Affected Systems
- Hyperium Hyper
📦 What is this software?
Hyper by Hyper
⚠️ Risk & Real-World Impact
Worst Case
Resource exhaustion leading to denial of service, potential for amplification attacks against downstream systems, and disruption of HTTP/2 services.
Likely Case
HTTP/2 service disruption through header size manipulation, causing connection failures or degraded performance for affected endpoints.
If Mitigated
Limited impact with proper network segmentation and request filtering; attackers can still target vulnerable endpoints but with reduced effectiveness.
🎯 Exploit Status
HTTP/2 header size manipulation is a well-known attack vector; exploitation requires sending specially crafted HTTP/2 requests.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 0.14.19 and later
Vendor Advisory: https://github.com/hyperium/hyper/security/advisories/GHSA-5h46-h7hh-c6x9
Restart Required: Yes
Instructions:
1. Update Cargo.toml to require hyper >=0.14.19
2. Run 'cargo update hyper'
3. Rebuild and redeploy application
4. Restart affected services
🔧 Temporary Workarounds
Disable HTTP/2
allConfigure Hyper to use only HTTP/1.x protocol
Set appropriate configuration in your Hyper server initialization to disable HTTP/2 support
Network-level filtering
allImplement WAF or proxy rules to limit HTTP/2 header sizes
🧯 If You Can't Patch
- Implement reverse proxy with HTTP/2 header size limits
- Deploy network segmentation to isolate vulnerable services
🔍 How to Verify
Check if Vulnerable:
Check Cargo.lock or run 'cargo tree | grep hyper' to see if hyper version is <0.14.19
Check Version:
cargo tree | grep -E '^hyper\s' | head -1
Verify Fix Applied:
Verify hyper version is >=0.14.19 in Cargo.lock and test HTTP/2 functionality
📡 Detection & Monitoring
Log Indicators:
- HTTP/2 connection resets
- Unusually large header sizes in logs
- Protocol errors in HTTP/2 sessions
Network Indicators:
- Excessive HTTP/2 HEADERS frames
- Abnormal header list sizes in HTTP/2 traffic
- Connection termination after HEADERS frames
SIEM Query:
http.protocol="HTTP/2" AND (http.header_size>threshold OR error.message CONTAINS "header_size")
🔗 References
- https://github.com/hyperium/hyper/compare/v0.14.18...v0.14.19
- https://github.com/hyperium/hyper/issues/2826
- https://github.com/hyperium/hyper/pull/2828
- https://github.com/hyperium/hyper/compare/v0.14.18...v0.14.19
- https://github.com/hyperium/hyper/issues/2826
- https://github.com/hyperium/hyper/pull/2828