CVE-2019-25765
CVE-2019-25765 — ASP-CMS commentList.asp SQL Injection
Executive Summary
CVE-2019-25765 is a high-severity SQL injection vulnerability (CVSS 7.5) in ASP-CMS, affecting the commentList.asp endpoint. The flaw permits unauthenticated remote attackers to inject arbitrary SQL through the id parameter in GET requests, enabling extraction of sensitive database contents. Exploitation was observed in the wild starting 2023-10-18 by the Shadowserver Foundation, and the product remains unpatched with no vendor response identified.
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
Technical Analysis
Vulnerability Classification
The vulnerability falls under CWE-89 (Improper Neutralization of Special Elements used in an SQL Command). ASP-CMS fails to properly sanitize the id parameter passed to the commentList.asp script, allowing an attacker to inject SQL statements that are executed against the underlying database.
Attack Mechanism
The commentList.asp script is responsible for retrieving and displaying comment records. It accepts an id parameter via GET request, which is used in a SQL WHERE clause to filter comments associated with a specific article or content ID. The lack of parameterized queries or input validation means that attacker-controlled data flows directly into the SQL statement.
When an attacker supplies a malicious value in the id parameter, such as a UNION-based injection payload or a boolean-based blind injection, the server concatenates it with the SQL query and executes the result. Because the endpoint is accessible without authentication (per the NVD description), no session or authorization check precedes the query execution.
Keyword Blocklist Bypass
The application vendor implemented a keyword blocklist intended to prevent SQL injection payloads from reaching the SQL engine — likely filtering on common terms like SELECT, UNION, or FROM. However, the description indicates attackers bypass this filter by interleaving the string 'master' within blocked SQL terms.
For example, a keyword such as SELECT could be written as SEMASTERLECT, where the string 'master' is inserted between characters. If the web application's filtering logic removes (or does not detect) the substring 'master' before passing the input to the query, the remaining characters reassemble the original blocked keyword. This technique exploits a common weakness in blocklist-based filters that lack recursive or iterative sanitization.
Exploitation Data Observations
The Shadowserver Foundation first recorded exploitation attempts on 2023-10-18 (UTC). This timing is noteworthy — the CVE was filed in 2019, meaning the vulnerability remained latent and exploitable for approximately four years before active scanning/exploitation was observed. This suggests either a renewed interest in legacy ASP-CMS deployments by threat actors, or the existence of an automated scanning campaign leveraging known vulnerability signatures.
Impact on Confidentiality
The CVSS vector indicates a High confidentiality impact (C:H) with No integrity impact (I:N) and No availability impact (A:N). This aligns with a SQL injection that primarily enables data exfiltration rather than data modification or service disruption. Attackers can leverage UNION-based injection to return arbitrary data alongside comment records, or use time-based/blind SQL injection to enumerate database contents when output is not directly visible.
Exploitation Scenarios
The following attack chain is inferred from the vulnerability class (CWE-89) and the NVD description, as no public PoC or technical write-up is available.
Step 1 — Reconnaissance/Target Identification
An attacker identifies ASP-CMS instances by scanning for the commentList.asp script. Since no version range is publicly documented, the attacker cannot filter targets byversion and instead relies on application fingerprinting. Shodan/Google dorks such as inurl:commentList.asp or searching for ASP-CMS login pages would surface candidates. The presence of .asp extension (indicating classic ASP runtime) narrows the field further, as this technology is rare in modern deployments and likely represents legacy infrastructure — frequently undermaintained and lacking security updates.
Step 2 — Triggering the Flaw
The attacker sends a GET request to commentList.asp with a specially crafted id parameter. Initial testing involves benign payloads that alter the query logic slightly (e.g., appending a single quote ' or AND 1=1 vs. AND 1=2) to confirm the presence of injection. Errors or differential responses confirm suspicion.
Step 3 — Payload Execution at the Vulnerability-Class Level
Once injection is confirmed, the attacker crafts SQL payloads:
- UNION-based injection:
id=1 UNION SELECT username,password FROM users— this relies on the injection point being at the end of the SELECT statement's WHERE clause, allowing the attacker to union additional columns. - Blind/boolean-based:
id=1 AND (SELECT SUBSTRING(DB_NAME(),1,1))='a'— used when the application does not display SQL errors or output injection results. - Time-based:
id=1; WAITFOR DELAY '00:00:05'(MSSQL) orid=1 AND SLEEP(5)(MySQL) — for blind cases where boolean responses are also not distinguishable.
Because the blocklist filter can be bypassed with 'master' interleaving, payloads need to be obfuscated. An attacker would first test which keywords are blocked (by sending SELECT and observing the block, then sending SEMASTERLECT and observing the block bypass). After identifying the filter's limitations, they iterate through obfuscation patterns to build functional payloads.
Step 4 — Post-Exploitation Impact
Successful SQL injection yields:
- Database enumeration: listing tables, columns, and schema information (
information_schema.tablesin MySQL,sysobjectsin MSSQL). - Credential harvest: extracting stored usernames and password hashes from CMS user tables. If passwords are stored in plaintext or weakly hashed (common in legacy ASP applications), immediate credential compromise occurs.
- Data exfiltration: retrieving CMS content, customer information (if the CMS powers an e-commerce site), or internal application data.
No public PoC exists for this vulnerability; the attack chain above is inferred from the vulnerability class and standard SQL injection techniques.
Impact Assessment
Business Impact
- Data breach risk: High — the vulnerability allows full database read access without authentication.
- Compliance violations: Organizations running ASP-CMS may face regulatory exposure (GDPR, HIPAA, PCI-DSS) if customer or payment data resides in the database.
- Reputational damage: Data exfiltration from a CMS often becomes public, damaging customer trust.
Affected Systems
All installations of ASP-CMS with the commentList.asp endpoint are vulnerable. The lack of version-specific information means every deployment should be treated as vulnerable. The product runs on Windows-based hosting with classic ASP/iis or Apache + mod_aspdotnet.
Blast Radius (CVSS Score Breakdown)
- Attack Vector: Network (N) — remotely exploitable over the internet.
- Attack Complexity: Low (L) — no specialized conditions required.
- Privileges Required: None (N) — unauthenticated exploitation.
- User Interaction: None (N) — no victim action required.
- Confidentiality Impact: High (H) — full database read possible.
- Integrity Impact: None (I:N) — injection is read-oriented (though MSSQL stacked queries could enable writes, the NVD does not confirm this).
- Availability Impact: None (A:N) — no direct DoS capability.
Threat Context
Observed exploitation by Shadowserver Foundation (2023-10-18) indicates the vulnerability is actively probed by scanning botnets or security researchers. The four-year gap between CVE publication and first observed exploitation suggests either low deployment numbers (delaying criminal interest) or a recent discovery of this CVE by automated tools.
Detection Guidance
Sigma Rule
title: Detect SQL Injection Attempts Against ASP-CMS commentList.asp
id: 4e9b9a1c-7d23-4f8d-9a5e-2c1f3b4a5d6e
status: experimental
description: Detects GET requests to commentList.asp with suspicious SQL keywords or quote characters in the id parameter, potentially obfuscated with 'master' interleaving.
logsource:
category: webserver
product: iis
detection:
selection:
cs-method: GET
cs-uri-path|contains: commentList.asp
cs-uri-query|contains:
- "'"
- "UNION"
- "SELECT"
- "MASTER"
- "WAITFOR"
- "information_schema"
filter_known_good:
cs-uri-query|contains: "id=[0-9]+$"
condition: selection and not filter_known_good
falsepositives:
- Penetration testing activities
- Security scanner traffic (Nuclei, sqlmap)
level: high
tags:
- attack.t1190
- cve.2019-25765
- cwe.89
YARA Rule
rule CVE_2019_25765_ASP_CommentList_SQLi
{
meta:
author = "Valters IT Security"
description = "Detects SQL injection payloads targeting commentList.asp with 'master' interleaving bypass"
cve = "2019-25765"
date = "2024-01-22"
strings:
$a = "commentList.asp" ascii nocase
$b = "id=" ascii nocase
$c1 = "SEMASTERLECT" ascii nocase
$c2 = "UNMASTERION" ascii nocase
$c3 = "FROM" ascii nocase
$c4 = "MASTER" ascii nocase
$c5 = "SELECT" ascii nocase
$sqli1 = "union" ascii nocase
$sqli2 = "'" ascii
$sqli3 = "waitfor delay" ascii nocase
$sqli4 = "-1 OR " ascii nocase
$sqli5 = "and sleep(" ascii nocase
condition:
uint16(0) == 0x4745 and all of ($a, $b) and 2 of ($c*) and 1 of ($sqli*)
}
Suricata IDS Rule
alert http any any -> $HOME_NET any (
msg:"CVE-2019-25765 ASP-CMS commentList.asp SQL Injection Attempt";
flow:established,to_server;
http.method;
http.uri;
content:"commentList.asp";
http.uri;
pcre:"/(?i)(id=.*(select|union|waitfor|master|from|sleep|benchmark|or))\b/s";
reference:cve,2019-25765;
classtype:attempted-admin;
sid:201925765;
rev:1;
metadata:created_at 2024-01-22;
)
Elastic Detection (EQL)
sequence by source.ip with maxspan=1m
[network where dns.question.name contains "commentList.asp" or http.request.uri contains "commentList.asp"]
[http where http.request.method == "GET" and
http.request.uri contains "commentList.asp" and
(http.request.uri contains ("'", "UNION", "SELECT", "MASTER", "WAITFOR", "sleep", "from"))]
Note: The above requires the Elastic HTTP/Network integration with appropriate field mappings.
Splunk SPL Query
index=proxy OR index=webserver
| where like(uri, "%commentList.asp%")
| regex uri="(?i)(id=.*(select|union|waitfor|master|from|sleep|benchmark|or))"
| stats count by src_ip, uri, user_agent, _time
| sort - count
Wazuh OSSEC Rule
<group name="web_application_attacks,">
<rule id="284372" level="15">
<if_group>web_application_attacks</if_group>
<decoded_as>web</decoded_as>
<field name="url">\.commentList\.asp</field>
<regex>(\?|&)id=.*['|UNION|SELECT|MASTER|WAITFOR|sleep|FROM]</regex>
<description>CVE-2019-25765 - ASP-CMS commentList.asp SQL injection attempt detected</description>
<group>sql_injection_attempt,</group>
<mitre><id>T1190</id></mitre>
</rule>
</group>
Mitigation & Patch Guidance
Immediate Mitigations (to apply today)
- Restrict network access: Place a WAF or reverse proxy in front of the ASP-CMS server with a rule to block requests to
commentList.aspcontaining SQL keywords or quote characters. - Vendor communication: Attempt to contact the ASP-CMS vendor (if identifiable) — the CVE lists no vendor or contact info, so this may not be feasible. If the product is abandoned, treat it as end-of-life.
- Database hardening: Enforce least-privilege for the database account used by the CMS. If the account is currently running as
saorroot, immediately reduce its privileges to only required CRUD operations. This limits what a SQL injection can access. - Network segmentation: Isolate the web server's database connectivity. Ensure the DB server is not accessible from the internet and that the CMS account cannot access other databases/hosts.
Patch/Upgrade Steps
PATCH CONFIDENCE: 0/4 — UNPATCHED. No vendor fix exists. The following options should be considered:
- Application of manual patch: If source code is available, replace dynamic SQL queries with parameterized queries (prepared statements). Specifically, modify the
idparameter handling incommentList.aspto validate that the value is a strictly numeric integer before use. - Legacy replacement: Given the age and lack of support, migrating to an actively maintained CMS (e.g., WordPress, Drupal) is strongly recommended. The cost of manual patching may outweigh the risk of continued operation.
- Virtual patching: Use a WAF (ModSecurity with OWASP CRS, AWS WAF, Cloudflare) to block the known attack pattern. This does not fix the underlying vulnerability but prevents exploitation.
Long-Term Hardening
- Replace ASP-CMS: Given the confirmed unpatched status, replacing the CMS is the only permanent remediation. Even if a manual patch is applied, the product's lack of maintenance means future (undisclosed) vulnerabilities are likely.
- Web application firewall: Deploy a WAF with SQL injection protection rules (OWASP CRS) in front of all web-facing applications.
- Input validation standard: Enforce strict allowlist validation (numeric only for
idparameters) and parameterized queries across all applications. - Monitoring: Implement database audit logging to detect anomalous queries — look for a high volume of
UNION,INFORMATION_SCHEMA, or table enumeration queries from a single source. - Version detection and asset inventory: Map all web-facing applications and their technologies. Maintain a vulnerability management program that identifies deprecated software and prioritizes replacement.
References
- NVD Entry: https://nvd.nist.gov/vuln/detail/CVE-2019-25765 — Official CVE record with description and CVSS vector.
- Shadowserver Foundation: https://www.shadowserver.org/ — First observed exploitation evidence (2023-10-18). Their daily "Vulnerable Services" reports or published sweep data reference this CVE.
- MITRE ATT&CK: https://attack.mitre.org/techniques/T1190/ — Exploit Public-Facing Application technique mapping.
- CWE-89: https://cwe.mitre.org/data/definitions/89.html — SQL Injection weakness description.
- CISA KEV: N/A — This CVE is not in the Known Exploited Vulnerabilities catalog. Check https://www.cisa.gov/known-exploited-vulnerabilities-catalog for updates.
Threat actor attribution: Unknown. No group has claimed or been attributed to these attacks. The exploitation pattern observed by Shadowserver suggests automated scanning rather than targeted government or criminal campaigns, but this cannot be confirmed at the time of writing.
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.