CVE-2025-6311

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 id/amount parameters in the /pages/account_add.php file. This affects all users running the vulnerable version of this 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 specific file /pages/account_add.php when handling id and amount parameters.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database takeover allowing data theft, data manipulation, authentication bypass, and potential remote code execution through database functions.

🟠

Likely Case

Unauthorized data access and extraction of sensitive information including user credentials, financial data, and inventory records.

🟢

If Mitigated

Limited impact with proper input validation and parameterized queries preventing SQL injection.

🌐 Internet-Facing: HIGH - The vulnerability is remotely exploitable and public exploit details are available.
🏢 Internal Only: HIGH - Even internal systems are vulnerable to authenticated or network-accessible attacks.

🎯 Exploit Status

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

Exploit details are publicly available on GitHub and vuldb, making exploitation straightforward for attackers.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: None found

Restart Required: No

Instructions:

No official patch available. Consider implementing parameterized queries and input validation in /pages/account_add.php.

🔧 Temporary Workarounds

Input Validation and Sanitization

all

Add strict input validation for id and amount parameters to only accept expected data types and ranges.

Modify /pages/account_add.php to validate parameters before SQL execution

Web Application Firewall (WAF)

all

Deploy WAF rules to block SQL injection patterns targeting account_add.php.

Configure WAF to block SQL injection patterns for /pages/account_add.php

🧯 If You Can't Patch

  • Remove or restrict access to /pages/account_add.php file
  • Implement network segmentation to isolate the vulnerable system

🔍 How to Verify

Check if Vulnerable:

Test the /pages/account_add.php endpoint with SQL injection payloads in id or amount parameters.

Check Version:

Check system documentation or configuration files for version information.

Verify Fix Applied:

Verify that SQL injection attempts no longer succeed and parameters are properly validated.

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL queries in database logs
  • Multiple failed login attempts or parameter manipulation in web logs

Network Indicators:

  • SQL injection patterns in HTTP requests to /pages/account_add.php

SIEM Query:

source="web_logs" AND uri="/pages/account_add.php" AND (param="id" OR param="amount") AND (contains(value, "'") OR contains(value, "--") OR contains(value, "OR"))

🔗 References

📤 Share & Export