CVE-2025-4711

7.3 HIGH

📋 TL;DR

This critical SQL injection vulnerability in Campcodes Sales and Inventory System 1.0 allows remote attackers to execute arbitrary SQL commands via the prod_name parameter in the /pages/stockin_add.php file. This affects all organizations using the vulnerable version of this inventory management software, potentially leading to complete database compromise.

💻 Affected Systems

Products:
  • Campcodes Sales and Inventory System
Versions: 1.0
Operating Systems: Any OS running PHP with database backend
Default Config Vulnerable: ⚠️ Yes
Notes: Affects the default installation; requires PHP and MySQL/MariaDB backend.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database takeover allowing data theft, modification, or deletion; potential privilege escalation to system-level access; installation of persistent backdoors.

🟠

Likely Case

Unauthorized access to sensitive business data including customer information, inventory records, financial data, and credentials; data manipulation affecting business operations.

🟢

If Mitigated

Limited impact with proper input validation and database permissions, potentially only allowing data viewing without modification.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Public exploit available; SQL injection via GET/POST parameter requires minimal technical skill.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: https://www.campcodes.com/

Restart Required: No

Instructions:

No official patch available. Consider manual code remediation or system replacement.

🔧 Temporary Workarounds

Input Validation Filter

all

Add input validation to sanitize prod_name parameter before SQL processing

Modify /pages/stockin_add.php to include: $prod_name = mysqli_real_escape_string($connection, $_POST['prod_name']);

Web Application Firewall

all

Deploy WAF with SQL injection rules to block malicious requests

🧯 If You Can't Patch

  • Isolate the system behind a firewall with strict access controls
  • Implement database user with minimal privileges (read-only if possible)
  • Monitor all access to /pages/stockin_add.php endpoint
  • Consider migrating to alternative inventory system

🔍 How to Verify

Check if Vulnerable:

Test by sending SQL injection payload to prod_name parameter: http://target/pages/stockin_add.php?prod_name=' OR '1'='1

Check Version:

Check system documentation or admin panel for version information

Verify Fix Applied:

Test with same payload; should return error or sanitized response without SQL execution

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL errors in application logs
  • Multiple requests to /pages/stockin_add.php with SQL keywords
  • Database queries from unexpected user accounts

Network Indicators:

  • HTTP requests containing SQL injection patterns in prod_name parameter
  • Unusual database connection patterns from web server

SIEM Query:

source="web_logs" AND uri="/pages/stockin_add.php" AND (prod_name CONTAINS "UNION" OR prod_name CONTAINS "SELECT" OR prod_name CONTAINS "OR '1'='1")

🔗 References

📤 Share & Export