CVE-2024-12376

7.5 HIGH

📋 TL;DR

A Server-Side Request Forgery (SSRF) vulnerability in lm-sys/fastchat web server allows attackers to make the server send requests to internal resources, potentially accessing sensitive data like AWS metadata credentials. This affects anyone running the vulnerable version of fastchat web server. Attackers could leverage this to steal credentials, access internal services, or pivot to other systems.

💻 Affected Systems

Products:
  • lm-sys/fastchat
Versions: git commit 2c68a13 and potentially earlier versions
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Specifically affects the web server component of fastchat. Any deployment using the vulnerable version is affected.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attacker obtains AWS metadata credentials, gains full cloud environment access, exfiltrates sensitive data, deploys malware, or causes significant financial/reputational damage.

🟠

Likely Case

Attacker accesses internal services, steals credentials from metadata services, performs reconnaissance on internal network, or uses server as proxy for attacks.

🟢

If Mitigated

Limited impact due to network segmentation, metadata service restrictions, or request validation preventing successful exploitation.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires understanding of SSRF techniques and knowledge of internal network/services. No public exploit code identified.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Versions after git commit 2c68a13

Vendor Advisory: https://huntr.com/bounties/c9cc3f28-ee9f-4d2d-9ee5-8c6455a11892

Restart Required: No

Instructions:

1. Update to latest fastchat version. 2. Verify the fix by checking git commit is newer than 2c68a13. 3. Restart the fastchat web server service.

🔧 Temporary Workarounds

Network Segmentation

linux

Restrict outbound network access from fastchat server to prevent SSRF to internal services

iptables -A OUTPUT -p tcp --dport 80 -j DROP
iptables -A OUTPUT -p tcp --dport 443 -j DROP

Metadata Service Protection

linux

Block access to cloud metadata endpoints (like 169.254.169.254 for AWS)

iptables -A OUTPUT -d 169.254.169.254 -j DROP

🧯 If You Can't Patch

  • Implement strict network egress filtering to block requests to internal IP ranges and metadata services
  • Deploy web application firewall (WAF) with SSRF protection rules to detect and block malicious requests

🔍 How to Verify

Check if Vulnerable:

Check if fastchat web server is running version with git commit 2c68a13 or earlier

Check Version:

git log --oneline -1

Verify Fix Applied:

Confirm fastchat version is updated beyond commit 2c68a13 and test SSRF attempts are blocked

📡 Detection & Monitoring

Log Indicators:

  • Unusual outbound HTTP requests from fastchat server
  • Requests to internal IP addresses or metadata endpoints
  • Failed connection attempts to restricted addresses

Network Indicators:

  • Fastchat server making unexpected outbound connections
  • Traffic to cloud metadata services (169.254.169.254)
  • HTTP requests with unusual User-Agent strings

SIEM Query:

source="fastchat" AND (dest_ip=169.254.169.254 OR dest_ip IN [10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16])

🔗 References

📤 Share & Export