CVE-2025-0200

6.3 MEDIUM

📋 TL;DR

This critical SQL injection vulnerability in code-projects Point of Sales and Inventory Management System 1.0 allows remote attackers to execute arbitrary SQL commands via the 'search' parameter in /user/search_num.php. Attackers can potentially access, modify, or delete database content. All users running version 1.0 are affected.

💻 Affected Systems

Products:
  • code-projects Point of Sales and Inventory Management System
Versions: 1.0
Operating Systems: All operating systems running the application
Default Config Vulnerable: ⚠️ Yes
Notes: All installations of version 1.0 are vulnerable by default. The vulnerability exists in the core application code.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise including theft of sensitive data (customer information, financial records), data destruction, and potential server takeover via SQL injection escalation.

🟠

Likely Case

Data exfiltration of sensitive business information, customer records, and inventory data leading to privacy violations and business disruption.

🟢

If Mitigated

Limited impact with proper input validation and database permissions, potentially only read access to non-sensitive data.

🌐 Internet-Facing: HIGH - The vulnerability is remotely exploitable and a public exploit exists, making internet-facing instances immediate targets.
🏢 Internal Only: MEDIUM - Internal systems are still vulnerable but require network access; risk increases if attackers gain internal foothold.

🎯 Exploit Status

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

Exploit code is publicly available on GitHub gist, making this easily weaponizable. The SQL injection appears to be straightforward with no authentication required.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

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

Restart Required: No

Instructions:

No official patch available. Check vendor website for updates. Consider implementing workarounds or migrating to alternative software.

🔧 Temporary Workarounds

Input Validation and Sanitization

all

Implement proper input validation and parameterized queries for the search parameter in /user/search_num.php

Modify PHP code to use prepared statements: $stmt = $conn->prepare('SELECT * FROM table WHERE column = ?'); $stmt->bind_param('s', $search); $stmt->execute();

Web Application Firewall (WAF) Rules

all

Deploy WAF rules to block SQL injection patterns in the search parameter

Add WAF rule: Detect and block SQL injection patterns in POST/GET parameters containing 'search'

🧯 If You Can't Patch

  • Isolate the system from internet access and restrict to internal network only
  • Implement strict network segmentation and monitor all database access attempts

🔍 How to Verify

Check if Vulnerable:

Test the /user/search_num.php endpoint with SQL injection payloads like: search=1' OR '1'='1

Check Version:

Check application version in admin panel or configuration files

Verify Fix Applied:

Verify that SQL injection payloads no longer execute and return proper error handling

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL queries in database logs
  • Multiple failed login attempts from search functionality
  • Suspicious patterns in web server logs for /user/search_num.php

Network Indicators:

  • Unusual database connections from web server
  • Large data transfers from database to external IPs

SIEM Query:

source="web_logs" AND uri="/user/search_num.php" AND (query="%27OR%27" OR query="%27UNION%27" OR query="%27SELECT%27")

🔗 References

📤 Share & Export