CVE-2019-12149

9.8 CRITICAL

📋 TL;DR

This CVE describes a SQL injection vulnerability in SilverStripe's restfulserver and registry modules that allows attackers to execute arbitrary SQL commands. Attackers can potentially read, modify, or delete database content, and in some cases achieve remote code execution. Organizations using affected versions of these SilverStripe modules are vulnerable.

💻 Affected Systems

Products:
  • silverstripe/restfulserver
  • silverstripe/registry
Versions: restfulserver: 1.0.x before 1.0.9, 2.0.x before 2.0.4, 2.1.x before 2.1.2; registry: 2.1.x before 2.1.1, 2.2.x before 2.2.1
Operating Systems: All operating systems running SilverStripe
Default Config Vulnerable: ⚠️ Yes
Notes: All SilverStripe installations using the affected module versions are vulnerable regardless of configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise leading to data theft, data destruction, and potential remote code execution through database functions.

🟠

Likely Case

Unauthorized data access, data manipulation, and potential privilege escalation within the application.

🟢

If Mitigated

Limited impact with proper input validation, parameterized queries, and database user privilege restrictions in place.

🌐 Internet-Facing: HIGH - Web applications using these modules are directly exposed to SQL injection attacks from the internet.
🏢 Internal Only: MEDIUM - Internal applications are still vulnerable but have reduced attack surface compared to internet-facing systems.

🎯 Exploit Status

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

SQL injection vulnerabilities are well-understood and often have automated exploitation tools available.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: restfulserver: 1.0.9, 2.0.4, 2.1.2; registry: 2.1.1, 2.2.1

Vendor Advisory: https://www.silverstripe.org/download/security-releases/cve-2019-12149

Restart Required: No

Instructions:

1. Update composer.json to require patched versions. 2. Run 'composer update silverstripe/restfulserver' or 'composer update silverstripe/registry'. 3. Clear SilverStripe cache if needed.

🔧 Temporary Workarounds

Disable vulnerable modules

all

Temporarily disable the restfulserver and registry modules if not essential

Remove module references from composer.json and run composer update

Web Application Firewall (WAF)

all

Deploy WAF rules to block SQL injection patterns

🧯 If You Can't Patch

  • Implement strict input validation and parameterized queries in custom code
  • Restrict database user permissions to minimum required privileges

🔍 How to Verify

Check if Vulnerable:

Check composer.json for affected module versions: 'composer show silverstripe/restfulserver' and 'composer show silverstripe/registry'

Check Version:

composer show silverstripe/restfulserver silverstripe/registry | grep -E 'name|versions'

Verify Fix Applied:

Verify installed versions are patched: 'composer show silverstripe/restfulserver | grep versions' and 'composer show silverstripe/registry | grep versions'

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL query patterns in database logs
  • Multiple failed login attempts or parameter manipulation in web logs
  • Unexpected database schema changes

Network Indicators:

  • SQL keywords in HTTP parameters (SELECT, UNION, INSERT, etc.)
  • Unusual database connection patterns from web servers

SIEM Query:

web_logs WHERE (url CONTAINS 'SELECT' OR url CONTAINS 'UNION' OR url CONTAINS 'INSERT') AND status_code = 200

🔗 References

📤 Share & Export