CVE-2020-1888

7.5 HIGH

📋 TL;DR

CVE-2020-1888 is an out-of-bounds memory read vulnerability in HHVM's JSON decoder that occurs when processing backslash characters. This can cause denial of service (DoS) by crashing the HHVM process. Affected users include anyone running vulnerable HHVM versions to serve PHP applications.

💻 Affected Systems

Products:
  • HHVM
Versions: Versions prior to 4.8.7, 4.9.0-4.32.0, 4.33.0-4.38.0, and 4.39.0-4.45.0
Operating Systems: All operating systems running HHVM
Default Config Vulnerable: ⚠️ Yes
Notes: All HHVM installations using JSON parsing are vulnerable by default.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete service disruption through HHVM process crashes leading to sustained denial of service.

🟠

Likely Case

Intermittent service disruptions when malformed JSON triggers the vulnerability.

🟢

If Mitigated

Minimal impact with proper input validation and network segmentation.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires sending malformed JSON to HHVM endpoints.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 4.8.7, 4.32.1, 4.38.1, 4.46.0 and later

Vendor Advisory: https://hhvm.com/blog/2020/02/20/security-update.html

Restart Required: Yes

Instructions:

1. Identify current HHVM version. 2. Upgrade to patched version. 3. Restart HHVM service. 4. Verify fix with test JSON payloads.

🔧 Temporary Workarounds

Input Validation Filter

all

Implement JSON input validation to reject malformed data before HHVM processing.

# Implement in application code or web server configuration

Rate Limiting

all

Limit request rates to reduce DoS impact potential.

# Configure in web server or load balancer

🧯 If You Can't Patch

  • Implement WAF rules to block malformed JSON patterns
  • Isolate HHVM instances behind reverse proxies with input filtering

🔍 How to Verify

Check if Vulnerable:

Check HHVM version against affected ranges: hhvm --version

Check Version:

hhvm --version

Verify Fix Applied:

Test with controlled JSON payloads containing backslash sequences and monitor for crashes.

📡 Detection & Monitoring

Log Indicators:

  • HHVM process crashes
  • Segmentation fault errors in logs
  • Unexpected service restarts

Network Indicators:

  • Spikes in malformed JSON requests
  • Unusual backslash patterns in payloads

SIEM Query:

source="hhvm.log" AND ("segmentation fault" OR "crash" OR "SIGSEGV")

🔗 References

📤 Share & Export