CVE-2024-55586

9.8 CRITICAL

📋 TL;DR

CVE-2024-55586 is an SQL injection vulnerability in Nette Database that occurs when untrusted filter data is passed directly to the where() method. This allows attackers to execute arbitrary SQL commands on affected database systems. Applications using Nette Database with user-supplied input in where() filters are vulnerable.

💻 Affected Systems

Products:
  • Nette Database
Versions: Through 3.2.4
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only vulnerable when untrusted user input is passed directly to where() method without proper sanitization.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise allowing data theft, modification, deletion, or remote code execution via database functions.

🟠

Likely Case

Data exfiltration, authentication bypass, or privilege escalation through SQL injection.

🟢

If Mitigated

Limited impact if input validation and parameterized queries are properly implemented.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires user input to reach vulnerable where() method calls. The vendor considers this intended behavior, not a vulnerability.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: N/A

Vendor Advisory: https://github.com/nette/database/releases

Restart Required: No

Instructions:

1. Review all where() method calls in your code. 2. Ensure user input is properly validated and sanitized before passing to where(). 3. Consider migrating to parameterized queries or prepared statements.

🔧 Temporary Workarounds

Input Validation and Sanitization

all

Implement strict input validation and sanitization for all user-supplied data before passing to where() method.

Parameterized Queries

all

Replace direct where() calls with parameterized queries or prepared statements.

🧯 If You Can't Patch

  • Implement web application firewall (WAF) rules to detect and block SQL injection attempts.
  • Restrict database user permissions to minimum required privileges.

🔍 How to Verify

Check if Vulnerable:

Review code for where() method calls that accept user input without proper validation or parameterization.

Check Version:

composer show nette/database | grep version

Verify Fix Applied:

Test that user input cannot modify SQL queries when passed to where() method.

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL query patterns
  • Multiple failed login attempts
  • Unexpected database errors

Network Indicators:

  • SQL syntax in HTTP parameters
  • Unusual database connection patterns

SIEM Query:

source="web_logs" AND (sql_injection OR "where()" OR "CVE-2024-55586")

🔗 References

📤 Share & Export