CVE-2025-7885
Python vulnerability analysis and mitigation

Overview

CVE-2025-7885 is a reflected Cross-Site Scripting (XSS) vulnerability in Huashengdun WebSSH affecting all versions up to and including 1.6.2. The flaw exists in the Login Page component, where the hostname and port query parameters are reflected unsanitized into the HTML response, enabling arbitrary JavaScript execution in a victim's browser. It was discovered on April 9, 2025, by researcher 4m3rr0r and publicly disclosed on July 20, 2025. The vendor was contacted prior to disclosure but did not respond. The vulnerability carries a CVSS v3.1 base score of 6.1 (Medium) (Feedly, PoC Report).

Technical details

The root cause is improper neutralization of user-supplied input (CWE-79), where the application reflects the port (and hostname) GET parameter values directly into the HTML response without input validation or output encoding (CWE-94). An attacker crafts a malicious URL containing a JavaScript payload in the port parameter (e.g., https://webssh.huashengdun.org/?port=alert('XSS')); when a victim visits this URL, the injected script executes in their browser within the context of the WebSSH origin. No authentication is required to trigger the vulnerability, but user interaction (clicking a crafted link) is necessary. A public PoC and GitHub issue documenting the vulnerability are available (GitHub Issue, PoC Report).

Impact

Successful exploitation allows an attacker to execute arbitrary JavaScript in the victim's browser under the WebSSH application's origin, enabling session hijacking, credential theft, phishing via the trusted domain, cross-site request forgery (CSRF) via injected JavaScript, and browser-based malware injection. Because WebSSH is a web-based SSH client, session hijacking could expose active SSH session tokens or credentials entered through the interface. Confidentiality and integrity are both at low risk per CVSS scoring, with no direct availability impact (PoC Report, Feedly).

Exploitability

A public proof-of-concept exploit has been disclosed and is available on GitHub, confirmed to work against WebSSH instances up to v1.6.2 (PoC Report). The EPSS score is approximately 0.031% (0.000310), indicating a low but non-zero probability of exploitation in the wild. No evidence of active in-the-wild exploitation, threat actor attribution, or CISA KEV catalog listing has been identified at this time. The CVSSv4 exploit maturity is rated as Proof-of-Concept (Feedly).

Exploitation steps

  1. Reconnaissance: Identify publicly accessible WebSSH instances running version 1.6.2 or earlier using search engines (e.g., Shodan, Censys) or by directly targeting known deployments such as the vendor's demo at webssh.huashengdun.org.
  2. Craft malicious URL: Construct a URL targeting the vulnerable port (or hostname) GET parameter with a JavaScript payload, e.g., https://<target>/?port=<script>alert('XSS')</script> or using URL-encoded variants such as https://<target>/?port=%3Cscript%3Ealert(%221%22)%3C%2Fscript%3E.
  3. Deliver the link: Send the crafted URL to a victim via phishing email, social engineering, or embed it in a malicious webpage to lure the victim into clicking it.
  4. Payload execution: When the victim's browser loads the URL, the WebSSH server reflects the unsanitized port value into the HTML response, causing the injected JavaScript to execute in the victim's browser under the WebSSH origin.
  5. Achieve objective: Use the executed JavaScript to steal session cookies, capture credentials entered on the login page, redirect the victim to a phishing page, or perform CSRF actions against the WebSSH application (GitHub Issue, PoC Report).

Indicators of compromise

  • Network: HTTP GET requests to the WebSSH login page containing URL-encoded script tags or JavaScript expressions in the port or hostname query parameters (e.g., ?port=%3Cscript%3E, ?port=alert(, ?hostname=<script>).
  • Logs: Web server access logs showing requests with suspicious characters (<, >, %3C, %3E, javascript:, alert() in the port or hostname query string parameters.
  • Logs: Repeated requests from the same IP to the WebSSH login endpoint with varying payload encodings, suggesting automated scanning or payload fuzzing.
  • Network: Outbound connections from victim browsers to attacker-controlled infrastructure (e.g., for cookie exfiltration) originating from the WebSSH application's origin (GitHub Issue, PoC Report).

Mitigation and workarounds

No official patch has been released by the vendor as of the disclosure date, and the vendor did not respond to the researcher's contact attempts. As a workaround, administrators should apply strict server-side input validation to ensure the port parameter accepts only numeric values, and the hostname parameter accepts only valid hostname characters, rejecting or sanitizing any other input before rendering. Deploying a Web Application Firewall (WAF) with XSS filtering rules can provide an additional layer of defense. Implementing a strong Content Security Policy (CSP) header on the WebSSH application can also limit the impact of any successful XSS injection (PoC Report, GitHub Issue).

Community reactions

The vulnerability was reported via a GitHub issue opened by researcher 4m3rr0r on April 9, 2025, and received no response from the vendor prior to public disclosure in July 2025. The issue remains open on the WebSSH GitHub repository with no maintainer acknowledgment or fix committed. The disclosure was picked up by several vulnerability aggregation platforms including VulDB, ENISA EUVD, CIRCL, and Tenable, indicating moderate community awareness (GitHub Issue, Feedly).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-50027CRITICAL9.8
  • Python logoPython
  • mcp-memory-service
NoYesAug 14, 2026
CVE-2026-49986HIGH7.1
  • Python logoPython
  • neuro-cortex-memory
NoYesAug 14, 2026
CVE-2026-53708MEDIUM6.6
  • Python logoPython
  • mcp-contextforge-gateway
NoYesAug 14, 2026
CVE-2026-47192LOW2.1
  • Python logoPython
  • kas
NoYesAug 14, 2026
CVE-2026-47191LOW2.1
  • Python logoPython
  • kas
NoYesAug 14, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management