CVE-2024-34532

9.8 CRITICAL

📋 TL;DR

A SQL injection vulnerability in the Yvan Dotet PostgreSQL Query Deluxe module allows remote attackers to execute arbitrary SQL commands via the query parameter. This can lead to privilege escalation, data theft, or complete system compromise. Systems running vulnerable versions of the query_deluxe module are affected.

💻 Affected Systems

Products:
  • Yvan Dotet PostgreSQL Query Deluxe module (query_deluxe)
Versions: 17.x before 17.0.0.4
Operating Systems: Any OS running PostgreSQL with vulnerable module
Default Config Vulnerable: ⚠️ Yes
Notes: Affects systems where the query_deluxe module is installed and exposed to user input.

⚠️ 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 leading to data exfiltration, privilege escalation to database administrator, and potential remote code execution on the underlying server.

🟠

Likely Case

Unauthorized data access, modification, or deletion through SQL injection, potentially leading to data breach or service disruption.

🟢

If Mitigated

Limited impact with proper input validation, parameterized queries, and least privilege database accounts in place.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Public exploit code available in OdZoo repository. SQL injection vulnerabilities are commonly weaponized.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 17.0.0.4

Vendor Advisory: Not specified in provided references

Restart Required: Yes

Instructions:

1. Backup current configuration and data. 2. Upgrade query_deluxe module to version 17.0.0.4 or later. 3. Restart PostgreSQL service. 4. Verify the fix by testing the vulnerable endpoint.

🔧 Temporary Workarounds

Input Validation and Sanitization

all

Implement strict input validation and parameterized queries to prevent SQL injection.

-- Implement parameterized queries in application code
-- Example: cursor.execute('SELECT * FROM table WHERE id = %s', (user_input,))

Network Segmentation

linux

Restrict access to the vulnerable endpoint using firewall rules or network segmentation.

iptables -A INPUT -p tcp --dport 5432 -s trusted_ip -j ACCEPT
iptables -A INPUT -p tcp --dport 5432 -j DROP

🧯 If You Can't Patch

  • Implement web application firewall (WAF) rules to block SQL injection patterns
  • Disable or remove the query_deluxe module if not essential

🔍 How to Verify

Check if Vulnerable:

Check query_deluxe module version. If version is 17.x and less than 17.0.0.4, system is vulnerable.

Check Version:

SELECT * FROM pg_available_extensions WHERE name = 'query_deluxe';

Verify Fix Applied:

Verify module version is 17.0.0.4 or later. Test the vulnerable endpoint with SQL injection payloads to confirm they are blocked.

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL queries in PostgreSQL logs
  • Multiple failed login attempts
  • Unexpected database schema changes

Network Indicators:

  • Unusual traffic patterns to PostgreSQL port 5432
  • SQL injection patterns in HTTP requests

SIEM Query:

source="postgresql.log" AND ("UNION SELECT" OR "OR 1=1" OR "--" OR ";--")

🔗 References

📤 Share & Export