Cloudanix VulnDB

CVE-2021-42258

Critical · 9.8 CISA KEV · ransomware

CVSS

9.8

EPSS

75.2%

Published

Oct 22, 2021

CISA due date

Nov 17, 2021

Cloudanix analysis

Act now SSVC: Act

A vulnerable billing web application can let attackers break in without a password and install ransomware, so exposed systems must be patched or isolated immediately.

Active In The Wild Wormable
Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Trivial
Impact
Remote Code Execution
Component
Application
Class
SQL Injection
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

This is an unauthenticated SQL injection in BQE BillQuick Web Suite 2018 through 2021 before version 22.0.9.1. A remote attacker can send crafted input, including through the txtID username parameter, that is interpreted as SQL by the backend database. Because exploitation can enable SQL Server command execution through xp_cmdshell, the impact can escalate from database manipulation to arbitrary operating-system command execution as the SQL Server service account, reported as MSSQLSERVER$. The flaw has network attack vector, low complexity, requires no credentials or user interaction, and can result in full confidentiality, integrity, and availability compromise of the affected application and underlying server.

Why it matters to the business

A vulnerable Internet-facing BillQuick Web Suite instance can be compromised without valid credentials, allowing attackers to steal business and billing data, alter records, deploy malware, and disrupt operations. This vulnerability is in CISA KEV, has known ransomware use, was observed exploited in the wild, and had a CISA remediation deadline of 2021-11-17, so any remaining exposure should be treated as urgent and potentially already targeted. Because the application typically supports billing, time tracking, and project/accounting workflows, compromise can directly affect revenue operations, customer trust, and incident recovery costs.

How an attack unfolds

An attacker identifies a reachable BillQuick Web Suite login or authentication-related endpoint and submits a crafted value in the txtID username parameter. The application passes that value into a SQL query without safely parameterizing it, allowing the attacker to alter query logic and execute attacker-controlled SQL. The attacker can use this access to enumerate databases, extract sensitive records, create or modify application data, and, where SQL Server features and permissions allow, enable and invoke xp_cmdshell. Once xp_cmdshell is available, the attacker runs operating-system commands under the SQL Server service context, commonly to download payloads, launch PowerShell or cmd.exe, establish persistence, and deploy ransomware or other malware. Public reporting links this vulnerability to in-the-wild exploitation and ransomware installation, so suspicious SQL Server child processes and post-exploitation tooling should be investigated as potential compromise, not just probing.

How to fix it

Upgrade BQE BillQuick Web Suite to version 22.0.9.1 or later immediately. If the supplied package inventory is applicable in parallel, update tcpreplay on Debian 12 and Debian 13 to 4.4.0-1 or later; however, validate product mapping because the vulnerability description concerns BQE BillQuick Web Suite. Restrict external access to BillQuick Web Suite until patched, ideally placing it behind VPN, SSO-aware access controls, or an allowlisted reverse proxy. Disable xp_cmdshell unless there is a documented business requirement, and confirm the SQL Server service account has least-privilege permissions and cannot write broadly across the host. Rotate credentials associated with the application and database after patching if exposure existed. For systems suspected of compromise, do not rely on patching alone; isolate the host, preserve evidence, rebuild from known-good media if necessary, and restore from clean backups.

How to confirm the fix worked

Confirm the installed BillQuick Web Suite version is 22.0.9.1 or later, or confirm the vulnerable product is not deployed. Verify that any package-management records supplied for Debian tcpreplay show version 4.4.0-1 or later if those assets are in scope. Review web server and application logs for historical requests to login endpoints containing txtID values with SQL metacharacters, stacked queries, UNION clauses, WAITFOR delays, or xp_cmdshell references. Validate SQL Server configuration with a safe administrative check to ensure xp_cmdshell is disabled unless explicitly required. Confirm no unexpected child processes were spawned by sqlservr.exe during the exposure window. Perform a controlled authenticated or unauthenticated vulnerability scan using current signatures, but avoid destructive SQL injection testing against production systems.

Typical attack path

  1. Scan for Internet-exposed BQE BillQuick Web Suite instances, especially versions 2018 through 2021 before 22.0.9.1.
  2. Send crafted unauthenticated requests to the login flow using the txtID username parameter to test for SQL injection behavior.
  3. Use SQL injection to enumerate database details, validate execution context, and access or modify application data.
  4. Attempt to enable or invoke SQL Server xp_cmdshell through injected SQL statements.
  5. Execute operating-system commands as the SQL Server service account, such as MSSQLSERVER$.
  6. Download and run additional payloads using cmd.exe, PowerShell, certutil, bitsadmin, or similar built-in tools.
  7. Establish persistence, disable defenses, exfiltrate data, and deploy ransomware or other malware.

How to detect it

Investigate web server, application, reverse proxy, WAF, SQL Server, Windows Event, PowerShell, Sysmon, and EDR telemetry from the first date of exposure through remediation. In web logs, look for unauthenticated requests to BillQuick login or authentication endpoints where the txtID parameter contains quotes, comments, semicolons, UNION SELECT, WAITFOR DELAY, EXEC, sp_configure, or xp_cmdshell. In SQL Server logs and default trace/audit sources, look for attempts to enable advanced options or xp_cmdshell, suspicious stored-procedure execution, failed or unusual logins, and large unexpected queries against business tables. In host telemetry, prioritize parent-child process relationships where sqlservr.exe launches cmd.exe, powershell.exe, wscript.exe, cscript.exe, certutil.exe, bitsadmin.exe, mshta.exe, rundll32.exe, regsvr32.exe, or other LOLBins. For ransomware-related activity, look for mass file modifications, shadow copy deletion, backup tampering, security tool stoppage, unusual archive creation, outbound connections to newly seen destinations, and payloads written to Windows temporary or public directories. Because exploitation has been observed in the wild, any confirmed xp_cmdshell invocation from the application database context should be handled as a likely compromise requiring full incident response.

  • txtID=
  • txtID='
  • txtID=%27
  • UNION SELECT
  • WAITFOR DELAY
  • xp_cmdshell
  • sp_configure 'xp_cmdshell'
  • sp_configure "xp_cmdshell"
  • show advanced options
  • EXEC master..xp_cmdshell
  • EXEC xp_cmdshell
  • MSSQLSERVER$
  • sqlservr.exe -> cmd.exe
  • sqlservr.exe -> powershell.exe
  • sqlservr.exe -> certutil.exe
  • sqlservr.exe -> bitsadmin.exe
  • sqlservr.exe -> mshta.exe
  • sqlservr.exe -> rundll32.exe
  • cmd.exe /c
  • powershell -enc
  • powershell -EncodedCommand
  • powershell -nop
  • certutil -urlcache
  • bitsadmin /transfer
  • vssadmin delete shadows
  • wmic shadowcopy delete
  • bcdedit /set {default} recoveryenabled no
  • C:\Windows\Temp\
  • C:\Users\Public\

What your security team should do

  • Treat all unpatched BillQuick Web Suite 2018-2021 instances before 22.0.9.1 as high-priority incident-response candidates because this vulnerability is KEV-listed and associated with ransomware activity.
  • Patch or remove public exposure immediately; if patching cannot be completed quickly, block Internet access to the application until remediation is complete.
  • Hunt for evidence of SQL injection, xp_cmdshell use, and sqlservr.exe spawning command interpreters or download utilities across the full period of exposure.
  • Disable xp_cmdshell and review SQL Server service-account privileges, local administrator membership, writable directories, and network access.
  • Rotate application, database, service-account, and privileged credentials if exploitation cannot be confidently ruled out.
  • Review EDR, web, SQL Server, Windows Security, PowerShell, and proxy logs for payload download, persistence, ransomware staging, and lateral movement.
  • Ensure tested offline or immutable backups exist before taking remediation actions on potentially compromised servers.
  • Validate asset inventory for inconsistent product mappings and ensure both application-level and operating-system package-level records reflect the correct fixed versions.

The record

BQE BillQuick Web Suite 2018 through 2021 before 22.0.9.1 allows SQL injection for unauthenticated remote code execution, as exploited in the wild in October 2021 for ransomware installation. SQL injection can, for example, use the txtID (aka username) parameter. Successful exploitation can include the ability to execute arbitrary code as MSSQLSERVER$ via xp_cmdshell.

Affected packages

Ecosystem Package Introduced Fixed

Related vulnerabilities