CVE-2022-30838

9.8 CRITICAL

📋 TL;DR

CVE-2022-30838 is a critical SQL injection vulnerability in Covid-19 Travel Pass Management System v1.0 that allows attackers to execute arbitrary SQL commands via the update_application_status function. This affects all organizations using this specific travel pass management software, potentially exposing sensitive passenger data and system control.

💻 Affected Systems

Products:
  • Covid-19 Travel Pass Management System
Versions: v1.0
Operating Systems: Any OS running PHP web server
Default Config Vulnerable: ⚠️ Yes
Notes: Affects default installation with no additional security hardening.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise leading to data theft, authentication bypass, remote code execution, and full system takeover.

🟠

Likely Case

Unauthorized access to sensitive passenger data (PII, travel records), database manipulation, and potential privilege escalation.

🟢

If Mitigated

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

🌐 Internet-Facing: HIGH - The vulnerable endpoint is accessible via web interface and requires no authentication.
🏢 Internal Only: MEDIUM - Still significant risk from internal threats or compromised accounts.

🎯 Exploit Status

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

Public exploit details available in GitHub repository with simple HTTP request payloads.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: No official vendor advisory found

Restart Required: No

Instructions:

1. Replace vulnerable code with parameterized queries
2. Implement input validation for all user inputs
3. Update to a secure version if available from vendor

🔧 Temporary Workarounds

Web Application Firewall (WAF) Rules

all

Block SQL injection patterns targeting the vulnerable endpoint

WAF specific - configure rules to block patterns like UNION SELECT, OR 1=1, --, ;, etc.

Access Restriction

linux

Restrict access to /ctpms/classes/Master.php endpoint

# Apache: RewriteRule ^ctpms/classes/Master\.php$ - [F]
# Nginx: location ~ ^/ctpms/classes/Master\.php$ { return 403; }

🧯 If You Can't Patch

  • Isolate the system from internet access and restrict to internal network only
  • Implement strict network segmentation and monitor all traffic to the vulnerable endpoint

🔍 How to Verify

Check if Vulnerable:

Send a test payload to /ctpms/classes/Master.php?f=update_application_status with SQL injection patterns and check for database errors or unexpected responses.

Check Version:

Check application version in admin panel or readme files - vulnerable if version is exactly 1.0

Verify Fix Applied:

Test the same endpoint with SQL injection payloads after remediation - should return proper error messages or reject malicious input.

📡 Detection & Monitoring

Log Indicators:

  • HTTP requests to /ctpms/classes/Master.php with SQL keywords in parameters
  • Database error logs showing SQL syntax errors from web requests

Network Indicators:

  • Unusual SQL patterns in HTTP POST/GET parameters
  • Multiple rapid requests to the vulnerable endpoint

SIEM Query:

source="web_logs" AND uri="/ctpms/classes/Master.php" AND (query="*UNION*" OR query="*SELECT*" OR query="*OR 1=1*")

🔗 References

📤 Share & Export