Skip to main content
CVE Vulnerability Database

CVE-2025-3545: H3C Magic Router RCE Vulnerability

CVE-2025-3545 is a critical command injection RCE vulnerability in H3C Magic router series that allows attackers to execute arbitrary commands. This post explains its impact, affected versions, and mitigation steps.

Published:

CVE-2025-3545 Overview

CVE-2025-3545 is a command injection vulnerability affecting multiple H3C Magic series routers, including Magic NX15, Magic NX30 Pro, Magic NX400, Magic R3010, and Magic BE18000 running firmware up to V100R014. The flaw resides in the FCGI_CheckStringIfContainsSemicolon function invoked by the /api/wizard/setLanguage endpoint within the HTTP POST request handler. An authenticated attacker on the adjacent network can inject arbitrary operating system commands through crafted request parameters. The exploit has been publicly disclosed, increasing the likelihood of opportunistic targeting on local networks. H3C recommends upgrading the affected firmware to remediate the issue.

Critical Impact

Authenticated adjacent-network attackers can execute arbitrary commands on affected H3C Magic routers, leading to full device compromise, credential theft, and network pivoting.

Affected Products

  • H3C Magic NX15, Magic NX30 Pro, Magic NX400 up to firmware V100R014
  • H3C Magic R3010 up to firmware V100R014
  • H3C Magic BE18000 up to firmware V100R014

Discovery Timeline

  • 2025-04-14 - CVE-2025-3545 published to NVD
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2025-3545

Vulnerability Analysis

The vulnerability sits in the FastCGI handler that processes POST requests to /api/wizard/setLanguage. The routine FCGI_CheckStringIfContainsSemicolon is intended to validate that user-supplied language parameters do not contain shell metacharacters. The check is incomplete, allowing attackers to bypass sanitization and inject shell commands that reach an underlying system call. Because the H3C Magic router web interface runs with elevated privileges, successful injection yields arbitrary command execution in the router's operating environment. The weakness maps to [CWE-74] Improper Neutralization of Special Elements in Output Used by a Downstream Component.

Root Cause

The sanitization function only inspects for a narrow set of characters and does not enforce strict allow-listing of language identifiers. Input reaches a command interpreter without adequate escaping or parameterization. Attackers can smuggle payloads using alternative shell separators or encoded metacharacters that the check does not recognize.

Attack Vector

Exploitation requires network adjacency to the router's LAN or Wi-Fi segment and low-privileged authentication to the web management interface. The attacker sends a crafted HTTP POST request to /api/wizard/setLanguage containing a malicious language value. The router executes the injected commands as part of the language configuration workflow. Public proof-of-concept material has been released via GitHub Gist PoC and cataloged in VulDB #304584.

No verified exploit code is reproduced here. Refer to the linked advisories for technical proof-of-concept details.

Detection Methods for CVE-2025-3545

Indicators of Compromise

  • HTTP POST requests to /api/wizard/setLanguage containing shell metacharacters such as backticks, $(), pipes, ampersands, or newline sequences in the language parameter.
  • Unexpected outbound connections originating from the router management plane, particularly to attacker-controlled infrastructure following configuration changes.
  • New or modified processes on the router filesystem, or unexpected changes to /etc/ configuration files following wizard API activity.

Detection Strategies

  • Inspect web server and FastCGI logs for POST requests to the setLanguage endpoint with non-standard payload sizes or non-ASCII content.
  • Deploy network intrusion detection signatures that flag command injection patterns in HTTP request bodies targeting H3C management URIs.
  • Correlate router administrative logins with subsequent DNS or outbound traffic anomalies to identify post-exploitation behavior.

Monitoring Recommendations

  • Restrict management access to a dedicated administrative VLAN and log all authentication events to the router web UI.
  • Forward router syslog data to a centralized SIEM for retention and anomaly detection.
  • Monitor firmware version inventory across managed H3C devices to identify unpatched units at scale.

How to Mitigate CVE-2025-3545

Immediate Actions Required

  • Upgrade affected H3C Magic devices to a firmware release later than V100R014 as published on the H3C Software Download portal.
  • Change all router administrative credentials after patching, assuming credentials may have been exposed on vulnerable devices.
  • Audit router configurations for unauthorized changes, added accounts, or modified DNS and routing entries.

Patch Information

H3C has published guidance through H3C Theme Details #229784 and provides updated firmware through its consumer product download portal. Administrators should validate downloaded firmware checksums before deployment and reboot devices to activate the updated FastCGI handler.

Workarounds

  • Disable remote and Wi-Fi access to the router administrative interface and require wired management access only.
  • Segment untrusted clients such as guest Wi-Fi from the router management VLAN using ACLs.
  • Enforce strong, unique administrative passwords to raise the barrier for the required low-privilege authentication.

Refer to the H3C Software Download portal for vendor configuration guidance specific to each Magic series model.

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.