CVE-2024-5986

9.1 CRITICAL

📋 TL;DR

This vulnerability in h2o-3 allows remote attackers to write arbitrary data to any file on the server, potentially leading to remote code execution and complete system compromise. It affects h2oai/h2o-3 version 3.46.0.1 when exposed to untrusted networks. Organizations running vulnerable h2o-3 instances are at risk.

💻 Affected Systems

Products:
  • h2oai/h2o-3
Versions: 3.46.0.1
Operating Systems: All platforms running h2o-3
Default Config Vulnerable: ⚠️ Yes
Notes: Affects h2o-3 instances with the vulnerable endpoints accessible. The /3/Parse and /3/Frames/framename/export endpoints are involved in the exploit chain.

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to complete system takeover, data theft, lateral movement, and persistent backdoor installation.

🟠

Likely Case

File system manipulation allowing attackers to overwrite critical files, modify configurations, or plant malicious scripts for future execution.

🟢

If Mitigated

Limited impact with proper network segmentation and access controls, though the vulnerability still exists.

🌐 Internet-Facing: HIGH - Directly exploitable via HTTP endpoints without authentication.
🏢 Internal Only: HIGH - Even internal attackers or compromised internal systems can exploit this vulnerability.

🎯 Exploit Status

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

Exploit details are publicly available via the huntr.com reference. The vulnerability involves chaining two endpoints to achieve arbitrary file write.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 3.46.0.2 or later

Vendor Advisory: https://huntr.com/bounties/64ff5319-6ac3-4447-87f7-b53495d4d5a3

Restart Required: Yes

Instructions:

1. Update h2o-3 to version 3.46.0.2 or later. 2. Restart the h2o-3 service. 3. Verify the update using the version check command.

🔧 Temporary Workarounds

Network Access Control

all

Restrict access to h2o-3 endpoints to trusted IP addresses only.

Use firewall rules (e.g., iptables, AWS Security Groups) to limit access to h2o-3 ports (typically 54321).

Endpoint Disablement

all

Disable or block the vulnerable /3/Parse and /3/Frames/framename/export endpoints if not needed.

Configure web server (e.g., nginx, Apache) to block requests to these endpoints.

🧯 If You Can't Patch

  • Isolate the h2o-3 instance in a restricted network segment with no internet access.
  • Implement strict file system permissions to limit what files h2o-3 can write to.

🔍 How to Verify

Check if Vulnerable:

Check if h2o-3 version is 3.46.0.1. If accessible, test if /3/Parse endpoint allows header injection.

Check Version:

Check h2o-3 logs or API response for version information, or run: python -c "import h2o; h2o.init(); print(h2o.__version__)" if using Python client.

Verify Fix Applied:

Confirm h2o-3 version is 3.46.0.2 or later and test that the exploit no longer works.

📡 Detection & Monitoring

Log Indicators:

  • Unusual requests to /3/Parse with manipulated headers
  • Multiple export requests to /3/Frames/*/export
  • File write errors or unexpected file modifications in h2o-3 logs

Network Indicators:

  • HTTP POST requests to /3/Parse followed by GET requests to /3/Frames/*/export
  • Unusual outbound connections from h2o-3 server

SIEM Query:

source="h2o-3" AND (uri_path="/3/Parse" OR uri_path="/3/Frames/*/export") AND status_code=200

🔗 References

📤 Share This