CVE-2015-8394

9.8 CRITICAL

📋 TL;DR

This vulnerability in PCRE (Perl Compatible Regular Expressions) library allows remote attackers to cause integer overflow via crafted regular expressions containing specific conditional patterns. This can lead to denial of service or potentially arbitrary code execution. Affects any software using vulnerable PCRE versions, including web browsers like Konqueror and various server applications.

💻 Affected Systems

Products:
  • PCRE library
  • Konqueror browser
  • Software using PCRE (Apache, PHP, Python, etc.)
Versions: PCRE versions before 8.38
Operating Systems: Linux, Unix-like systems, Windows (if using PCRE)
Default Config Vulnerable: ⚠️ Yes
Notes: Any application using PCRE for regex processing is potentially vulnerable when processing untrusted input

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to complete system compromise

🟠

Likely Case

Denial of service through application crashes or resource exhaustion

🟢

If Mitigated

Limited impact with proper input validation and sandboxing

🌐 Internet-Facing: HIGH - Exploitable via web applications processing user-supplied regex patterns
🏢 Internal Only: MEDIUM - Requires applications processing regex input

🎯 Exploit Status

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

Proof-of-concept demonstrated with JavaScript RegExp in Konqueror; similar exploitation possible in other contexts

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: PCRE 8.38 and later

Vendor Advisory: http://www.openwall.com/lists/oss-security/2015/11/29/1

Restart Required: Yes

Instructions:

1. Update PCRE to version 8.38 or later
2. Recompile applications using PCRE
3. Restart affected services

🔧 Temporary Workarounds

Input validation

all

Validate and sanitize regular expression patterns from untrusted sources

PCRE compile-time options

linux

Use PCRE_NO_AUTO_CAPTURE or limit recursion depth

Configure with --disable-auto-capture-setup during compilation

🧯 If You Can't Patch

  • Implement strict input validation for regex patterns
  • Use WAF rules to block malicious regex patterns

🔍 How to Verify

Check if Vulnerable:

Check PCRE version: pcretest -C | grep 'PCRE version'

Check Version:

pcretest -C | grep 'PCRE version'

Verify Fix Applied:

Verify version is 8.38 or higher: pcretest -C

📡 Detection & Monitoring

Log Indicators:

  • Application crashes
  • Memory exhaustion errors
  • Unusual regex processing patterns

Network Indicators:

  • HTTP requests containing complex regex patterns
  • Unexpected application termination

SIEM Query:

search 'PCRE overflow' OR 'regex crash' OR 'application terminated unexpectedly'

🔗 References

📤 Share & Export