CVE-2022-31394

7.5 HIGH

📋 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

Products:
  • Hyperium Hyper
Versions: All versions before 0.14.19
Operating Systems: All platforms running Rust applications with Hyper
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems with HTTP/2 enabled; HTTP/1.x is not vulnerable. Applications must be using the affected h2 dependency through Hyper.

📦 What is this software?

⚠️ 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.

🌐 Internet-Facing: HIGH - HTTP/2 services exposed to the internet are directly vulnerable to unauthenticated attacks.
🏢 Internal Only: MEDIUM - Internal services using HTTP/2 remain vulnerable but have reduced attack surface compared to internet-facing systems.

🎯 Exploit Status

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

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

all

Configure Hyper to use only HTTP/1.x protocol

Set appropriate configuration in your Hyper server initialization to disable HTTP/2 support

Network-level filtering

all

Implement 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

📤 Share & Export