/

CVE-2026-18812

Severity:

HIGH RISK

(7.2)

Command Injection (CWE-77) in H3C NX15 WAN API Endpoint

CVE-2026-18812

Deferred

Vulnerability type

Category:

Command Injection

CWE:

CWE-74, CWE-77

Impact:

Remote Command Execution

Severity:

HIGH RISK

(7.2)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A high-severity command injection flaw in the H3C NX15 WAN API allows remotely supplied input to influence command execution through the workMode argument. An attacker who can reach the affected API may execute unauthorized commands on the device when crafted input is processed by the IPv6 WAN configuration function.

Affected context

The vulnerability occurs in H3C NX15 devices running the affected software release when the /api/esps endpoint processes requests for esps.ipv6.wan. Risk is present where the endpoint is remotely reachable and the workMode value is incorporated into an operating-system command without adequate separation from executable syntax.

Exploit preconditions

  • Attack surface: Network-accessible H3C NX15 management or service API
  • Required access: Ability to send requests to the affected /api/esps functionality; authentication requirements depend on device configuration
  • Trigger point: Processing of the workMode argument by the esps.ipv6.wan function
  • Why exploitation is possible: User-controlled input can reach command execution logic without sufficient validation, filtering, or safe argument handling

Why this happens

The underlying issue is improper neutralization of special elements in externally supplied input before that input is used in an operating-system command. This behavior maps primarily to CWE-77: Improper Neutralization of Special Elements used in a Command, with CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component describing the broader injection class. The insecure pattern occurs when application data is concatenated into shell commands or interpreted by a command processor instead of being passed as strictly separated arguments.

Potential impact

  • An attacker may execute unauthorized commands on the network device
  • Device configuration or operational data could be modified
  • The device may be disrupted or rendered unavailable
  • Credentials, secrets, or network information could be exposed
  • A compromised device could support further movement within connected networks

General mitigation guidance

Mitigation generally focuses on removing shell interpretation from request-processing paths and reducing trust in client-controlled values.

Common defensive patterns include:

  • Replacing shell command construction with direct, non-shell APIs
  • Passing parameters through structured argument interfaces rather than string concatenation
  • Allowing only narrowly defined values for fields such as workMode
  • Applying server-side schema validation before invoking system operations
  • Restricting management interfaces to trusted networks and enforcing least privilege
  • Separating device service privileges from broader operating-system permissions
  • Logging rejected input and anomalous requests without recording sensitive data

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis rules that identify user-controlled data flowing into shell execution or command-spawning functions
  • Code review checks for string concatenation, interpolation, or format operations used to build commands
  • Tests that verify invalid and metacharacter-containing values are rejected before system calls
  • API gateway policies restricting management endpoints and validating enumerated parameters
  • Runtime monitoring for unexpected commands, process creation, or unusual requests to /api/esps

Neutral automated code-review and software composition tools may help identify command-construction patterns, but their findings should be validated against the device's actual execution flow.

Sources

SourceLink
github.comgithub.com/coconut652-7/IOT_Vul_Public/tree/main/H3C/NX15R017/esps_ipv6_wan_set_workmode_root_rce
vuldb.comvuldb.com/cve/CVE-2026-18812
vuldb.comvuldb.com/submit/857809
vuldb.comvuldb.com/vuln/385811
vuldb.comvuldb.com/vuln/385811/cti

Frequently asked

questions

Yes. The affected API is remotely reachable, although practical exploitability depends on network exposure, authentication, and authorization controls protecting the endpoint.

An attacker needs the ability to submit requests to the vulnerable API. Whether valid credentials are required depends on the device's deployment and access-control configuration.

Avoid invoking a shell with request-derived strings. Use direct system APIs, separated arguments, strict allowlists, and server-side validation for the workMode value.

Treat all API parameters as untrusted, enforce least privilege, restrict management-plane exposure, review data flows into process execution functions, and test validation and authorization controls in CI and security assessments.

Find out what's already
exploitable in your codebase.