CVE-2022-32101

9.8 CRITICAL

📋 TL;DR

CVE-2022-32101 is a SQL injection vulnerability in kkcms v1.3.7 that allows attackers to execute arbitrary SQL commands via the cid parameter in /template/wapian/vlist.php. This affects all users running the vulnerable version of kkcms, potentially leading to data theft, modification, or deletion.

💻 Affected Systems

Products:
  • kkcms
Versions: v1.3.7
Operating Systems: Any OS running PHP
Default Config Vulnerable: ⚠️ Yes
Notes: The vulnerability exists in the default installation of kkcms v1.3.7.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise leading to data exfiltration, privilege escalation, or remote code execution via database functions.

🟠

Likely Case

Unauthorized data access, modification of database content, or authentication bypass.

🟢

If Mitigated

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

🌐 Internet-Facing: HIGH - The vulnerable endpoint is accessible via web requests, making it directly exploitable from the internet.
🏢 Internal Only: MEDIUM - Internal attackers could exploit this if they have network access to the system.

🎯 Exploit Status

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

SQL injection via URL parameters is well-understood and easily automated.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: No official vendor advisory found

Restart Required: No

Instructions:

1. Check for updated versions beyond v1.3.7. 2. If no patch exists, implement parameterized queries in /template/wapian/vlist.php. 3. Validate and sanitize all user inputs, especially the cid parameter.

🔧 Temporary Workarounds

Input Validation and Sanitization

all

Add input validation to ensure cid parameter contains only expected values.

Modify /template/wapian/vlist.php to validate cid parameter using PHP filter functions

Web Application Firewall (WAF)

all

Deploy a WAF to block SQL injection attempts targeting the vulnerable endpoint.

Configure WAF rules to block SQL injection patterns in requests to /template/wapian/vlist.php

🧯 If You Can't Patch

  • Restrict network access to the kkcms instance using firewall rules.
  • Implement strict input validation and use parameterized queries in the vulnerable file.

🔍 How to Verify

Check if Vulnerable:

Test by sending a crafted SQL injection payload to /template/wapian/vlist.php?cid=1' OR '1'='1

Check Version:

Check kkcms version in configuration files or admin panel.

Verify Fix Applied:

Verify that SQL injection attempts no longer succeed and that parameterized queries are implemented.

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL errors in web server logs
  • Multiple requests to /template/wapian/vlist.php with suspicious cid parameters

Network Indicators:

  • HTTP requests containing SQL keywords (SELECT, UNION, etc.) in the cid parameter

SIEM Query:

source="web_server" AND uri="/template/wapian/vlist.php" AND (cid="*'*" OR cid="*%27*" OR cid="*SELECT*" OR cid="*UNION*")

🔗 References

📤 Share & Export