Product Information

Affected Models and Firmware Versions

Vulnerability Description

H3C Magic BE18000 V200R007, H3C NX400 V100R015, H3C Magic NX30 Pro V100R0011, H3C Magic R3010 V100R009, H3C Magic NX15 V100R017, H3C Magic R1510 V100R016, H3C NE36 Pro V100R002 and H3C MC102G HM1A0V200R010 contain multiple command injection vulnerabilities in the /api/esps request handler. The affected object interfaces and methods are esps.dhcpd.vlan (getlist, delete), esps.filter.url (add, modify), esps.apcm.version (delete, H3C Magic NX15 only), esps.swcm.version (delete, upgrade, all affected models except H3C Magic NX15), and esps.system.ntp (set, all affected models except H3C Magic NX15). Attacker-controlled request parameters are incorporated into shell expressions executed by eval without adequate validation, allowing a remote attacker to execute arbitrary commands as root and gain complete control of the affected device.

Vulnerability Details

1. esps.dhcpd.vlan - getlist

Handler file: /usr/libexec/rpcd/esps.dhcpd.vlan

The getlist method retrieves each vlan_name value from the list array, places it inside double quotes in a shell assignment expression, and executes the resulting expression with eval. Command substitution using backticks or $() is processed inside the evaluated string, allowing an attacker to inject and execute arbitrary commands.

image.png

2. esps.dhcpd.vlan - delete

Handler file: /usr/libexec/rpcd/esps.dhcpd.vlan

The delete method retrieves each vlan_name value from the list array, places it inside double quotes in a shell assignment expression, and executes the resulting expression with eval. Command substitution using backticks or $() is processed inside the evaluated string, allowing an attacker to inject and execute arbitrary commands.