CVE-2022-28023

9.8 CRITICAL

📋 TL;DR

CVE-2022-28023 is a critical SQL injection vulnerability in Purchase Order Management System v1.0 that allows attackers to execute arbitrary SQL commands via the delete_supplier function. This affects all users running the vulnerable version of this software, potentially leading to complete database compromise.

💻 Affected Systems

Products:
  • Purchase Order Management System
Versions: v1.0
Operating Systems: Any OS running PHP web server
Default Config Vulnerable: ⚠️ Yes
Notes: Affects all installations of v1.0 regardless of configuration. The vulnerability is in the core application code.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database takeover allowing data theft, modification, deletion, and potential remote code execution on the database server.

🟠

Likely Case

Unauthorized access to sensitive purchase order data, supplier information, and potential privilege escalation within the application.

🟢

If Mitigated

Limited impact with proper input validation and parameterized queries in place.

🌐 Internet-Facing: HIGH - The vulnerable endpoint is accessible via web interface, making internet-facing instances immediately vulnerable to attack.
🏢 Internal Only: HIGH - Even internal instances are vulnerable to insider threats or compromised internal systems.

🎯 Exploit Status

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

Exploitation requires authentication to access the supplier management functionality. The SQL injection is straightforward once authenticated.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: No official vendor advisory found

Restart Required: No

Instructions:

No official patch available. Consider migrating to a supported alternative or implementing workarounds.

🔧 Temporary Workarounds

Input Validation and Sanitization

all

Implement strict input validation and parameterized queries in the delete_supplier function

Modify /purchase_order/classes/Master.php to use prepared statements

Web Application Firewall (WAF)

all

Deploy WAF rules to block SQL injection patterns

Configure WAF to block SQL injection attempts to /purchase_order/classes/Master.php

🧯 If You Can't Patch

  • Isolate the Purchase Order Management System from internet access
  • Implement strict network segmentation and monitor all access to the vulnerable endpoint

🔍 How to Verify

Check if Vulnerable:

Check if running Purchase Order Management System v1.0 and test the /purchase_order/classes/Master.php?f=delete_supplier endpoint with SQL injection payloads

Check Version:

Check application version in admin panel or review source code headers

Verify Fix Applied:

Test the vulnerable endpoint with SQL injection payloads to ensure they are properly rejected

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL queries in database logs
  • Multiple failed delete_supplier attempts
  • SQL syntax errors in application logs

Network Indicators:

  • HTTP POST requests to /purchase_order/classes/Master.php with SQL keywords in parameters

SIEM Query:

source="web_logs" AND uri="/purchase_order/classes/Master.php" AND (param="delete_supplier" OR param CONTAINS "UNION" OR param CONTAINS "SELECT" OR param CONTAINS "OR 1=1")

🔗 References

📤 Share & Export