CVE-2021-42258

9.8 CRITICAL

📋 TL;DR

CVE-2021-42258 is a critical SQL injection vulnerability in BQE BillQuick Web Suite that allows unauthenticated attackers to execute arbitrary SQL commands. This can lead to remote code execution via xp_cmdshell, enabling ransomware deployment. Organizations using affected versions of BillQuick Web Suite are at risk.

💻 Affected Systems

Products:
  • BQE BillQuick Web Suite
Versions: 2018 through 2021 before version 22.0.9.1
Operating Systems: Windows (due to MSSQL dependency)
Default Config Vulnerable: ⚠️ Yes
Notes: Requires MSSQL with xp_cmdshell enabled for full RCE, but SQL injection works regardless.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise with ransomware deployment, data exfiltration, and persistent backdoor installation via MSSQLSERVER$ account privileges.

🟠

Likely Case

Ransomware deployment leading to data encryption, business disruption, and potential data theft as observed in real-world attacks.

🟢

If Mitigated

Limited impact with proper network segmentation, SQL injection prevention controls, and restricted database permissions.

🌐 Internet-Facing: HIGH - Exploitable without authentication and actively exploited in the wild for ransomware.
🏢 Internal Only: HIGH - Even internally accessible instances are vulnerable to network-based attacks.

🎯 Exploit Status

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

Actively exploited in the wild since October 2021 for ransomware deployment. Exploitation requires minimal technical skill.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 22.0.9.1 and later

Vendor Advisory: https://www.bqe.com/support/security-advisory/

Restart Required: Yes

Instructions:

1. Backup all data and configurations. 2. Download and install BillQuick Web Suite version 22.0.9.1 or later from BQE support portal. 3. Restart the application and verify functionality.

🔧 Temporary Workarounds

Disable xp_cmdshell

windows

Prevents command execution via SQL injection by disabling the xp_cmdshell stored procedure in MSSQL.

EXEC sp_configure 'show advanced options', 1;
RECONFIGURE;
EXEC sp_configure 'xp_cmdshell', 0;
RECONFIGURE;

Network Segmentation

all

Isolate BillQuick servers from internet and restrict access to necessary internal networks only.

🧯 If You Can't Patch

  • Implement a web application firewall (WAF) with SQL injection rules to block exploitation attempts.
  • Restrict database user permissions to prevent xp_cmdshell execution and implement input validation at application layer.

🔍 How to Verify

Check if Vulnerable:

Check BillQuick version in application interface or installation directory. Versions 2018-2021 before 22.0.9.1 are vulnerable.

Check Version:

Check Help > About in BillQuick interface or examine installed program version in Windows Programs and Features.

Verify Fix Applied:

Verify version is 22.0.9.1 or later and test SQL injection attempts are blocked.

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL queries containing xp_cmdshell or command execution patterns in database logs
  • Multiple failed login attempts or SQL errors in application logs

Network Indicators:

  • SQL injection patterns in HTTP requests to BillQuick endpoints
  • Outbound connections from database server to unknown IPs

SIEM Query:

source="web_logs" AND (uri="*txtID=*" AND (content="xp_cmdshell" OR content="EXEC" OR content="UNION"))

🔗 References

📤 Share & Export