CVE-2024-11998

6.3 MEDIUM

📋 TL;DR

This vulnerability allows remote attackers to execute arbitrary SQL commands via the 'id' parameter in the /visualizer-forneccedor.chp file in Farmacia 1.0. Attackers can potentially read, modify, or delete database content. Anyone running Farmacia 1.0 with this file accessible is affected.

💻 Affected Systems

Products:
  • Farmacia
Versions: 1.0
Operating Systems: All operating systems running the vulnerable software
Default Config Vulnerable: ⚠️ Yes
Notes: The vulnerability exists in the default installation of Farmacia 1.0. Any system with the /visualizer-forneccedor.chp file accessible is vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise including data theft, data manipulation, or deletion; potential authentication bypass leading to administrative access; possible remote code execution if database functions allow it.

🟠

Likely Case

Data extraction from the database, including sensitive information like user credentials, personal data, or business records.

🟢

If Mitigated

Limited impact with proper input validation and database permissions, potentially only error messages or limited data exposure.

🌐 Internet-Facing: HIGH - The vulnerability is remotely exploitable and a public exploit exists, making internet-facing instances prime targets.
🏢 Internal Only: MEDIUM - Internal systems are still vulnerable but have reduced attack surface compared to internet-facing deployments.

🎯 Exploit Status

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

The exploit is publicly available on GitHub and requires minimal technical skill to execute against vulnerable systems.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: https://code-projects.org/

Restart Required: No

Instructions:

No official patch is available. Consider upgrading to a newer version if available, or implement workarounds.

🔧 Temporary Workarounds

Input Validation Filter

all

Implement server-side input validation to sanitize the 'id' parameter before processing.

# Example PHP input validation
$id = filter_var($_GET['id'], FILTER_VALIDATE_INT);
if ($id === false) { die('Invalid input'); }

Web Application Firewall (WAF)

all

Deploy a WAF with SQL injection rules to block malicious requests.

# Example mod_security rule
SecRule ARGS:id "@detectSQLi" "id:1001,phase:2,deny"

🧯 If You Can't Patch

  • Restrict network access to the application using firewall rules to only trusted IP addresses.
  • Implement database user with minimal privileges (read-only if possible) for the application connection.

🔍 How to Verify

Check if Vulnerable:

Test the /visualizer-forneccedor.chp endpoint with SQL injection payloads in the 'id' parameter (e.g., id=1' OR '1'='1). Monitor for database errors or unexpected responses.

Check Version:

Check the application version through its interface or configuration files. For Farmacia, review the software documentation or admin panel.

Verify Fix Applied:

After implementing fixes, retest with the same payloads to ensure they are blocked or sanitized properly.

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL error messages in application logs
  • Multiple requests to /visualizer-forneccedor.chp with suspicious 'id' parameters
  • Database query errors containing SQL syntax

Network Indicators:

  • HTTP requests with SQL keywords (e.g., UNION, SELECT, OR) in the 'id' parameter
  • Abnormal traffic patterns to the vulnerable endpoint

SIEM Query:

Example: source="web_logs" AND uri="/visualizer-forneccedor.chp" AND (query_string="*id=*OR*" OR query_string="*id=*UNION*" OR query_string="*id=*SELECT*")

🔗 References

📤 Share & Export