/

CVE-2026-112371

Severity:

CRITICAL RISK

(9.9)

Code Injection (CWE-94) in H3C Magic NX15 RPC Interface

CVE-2026-112371

Deferred

Vulnerability type

Category:

Code Injection

CWE:

CWE-74, CWE-94

Impact:

Remote Code Execution

Severity:

CRITICAL RISK

(9.9)

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 critical code-injection vulnerability in the H3C Magic NX15 RPC interface affects the file-write function exposed through /api/esps.

A remote attacker who can reach the affected endpoint may manipulate the path argument and cause injected code to be processed by the device.

A critical code-injection vulnerability in the H3C Magic NX15 RPC interface affects the file-write function exposed through /api/esps.

A remote attacker who can reach the affected endpoint may manipulate the path argument and cause injected code to be processed by the device.

Affected context

The vulnerability occurs in H3C Magic NX15 devices running the affected NX15V100R017 software when the RPC interface exposes the /api/esps file-write functionality. Risk increases when the endpoint is remotely reachable and accepts insufficiently constrained path-related input before performing file operations or other processing.

The vulnerability occurs in H3C Magic NX15 devices running the affected NX15V100R017 software when the RPC interface exposes the /api/esps file-write functionality. Risk increases when the endpoint is remotely reachable and accepts insufficiently constrained path-related input before performing file operations or other processing.

Exploit preconditions

  • Attack surface: Remote RPC interface
  • Required access: Network reachability to the exposed /api/esps endpoint; additional authentication requirements depend on device configuration
  • Trigger point: Processing of the path argument by the file-write function
  • Why exploitation is possible: The endpoint may interpret attacker-controlled path input in a way that permits code injection rather than treating it solely as inert file metadata
  • Attack surface: Remote RPC interface
  • Required access: Network reachability to the exposed /api/esps endpoint; additional authentication requirements depend on device configuration
  • Trigger point: Processing of the path argument by the file-write function
  • Why exploitation is possible: The endpoint may interpret attacker-controlled path input in a way that permits code injection rather than treating it solely as inert file metadata

Why this happens

The underlying issue is improper handling of attacker-controlled input in a file-writing RPC operation. When path data is incorporated into downstream commands, interpreters, or executable processing without strict separation and validation, specially crafted input may alter program behavior.

This maps primarily to CWE-94: Improper Control of Generation of Code ('Code Injection') and is also related to CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection').

The underlying issue is improper handling of attacker-controlled input in a file-writing RPC operation. When path data is incorporated into downstream commands, interpreters, or executable processing without strict separation and validation, specially crafted input may alter program behavior.

This maps primarily to CWE-94: Improper Control of Generation of Code ('Code Injection') and is also related to CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection').

Potential impact

  • An attacker may execute unauthorized code on the affected device
  • Device configuration, files, or services could be modified
  • Network traffic or administrative data could be exposed
  • The device could be used for lateral movement or disruption
  • Compromise could affect other systems reachable from the device
  • An attacker may execute unauthorized code on the affected device
  • Device configuration, files, or services could be modified
  • Network traffic or administrative data could be exposed
  • The device could be used for lateral movement or disruption
  • Compromise could affect other systems reachable from the device

General mitigation guidance

Mitigation generally focuses on ensuring that file-operation inputs remain data and cannot become executable instructions.

Common defensive patterns include:

  • Use dedicated file APIs instead of shell commands or interpreter evaluation
  • Apply strict allowlist validation to path formats, permitted directories, and filenames
  • Canonicalize paths and enforce confinement within an intended directory
  • Separate user-controlled values from command or code construction
  • Apply authentication and authorization checks consistently to RPC operations
  • Run device services with the minimum privileges needed for file access
  • Restrict network exposure of management and RPC interfaces
  • Log rejected inputs and unusual file-write activity for investigation

Mitigation generally focuses on ensuring that file-operation inputs remain data and cannot become executable instructions.

Common defensive patterns include:

  • Use dedicated file APIs instead of shell commands or interpreter evaluation
  • Apply strict allowlist validation to path formats, permitted directories, and filenames
  • Canonicalize paths and enforce confinement within an intended directory
  • Separate user-controlled values from command or code construction
  • Apply authentication and authorization checks consistently to RPC operations
  • Run device services with the minimum privileges needed for file access
  • Restrict network exposure of management and RPC interfaces
  • Log rejected inputs and unusual file-write activity for investigation

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis rules identifying string concatenation between request parameters and commands, interpreters, or dynamic code paths
  • Code review checks for file-write handlers that accept unrestricted path values
  • Testing with metacharacter and boundary-case inputs in isolated environments
  • Policy enforcement requiring allowlisted paths and non-shell process execution
  • Runtime monitoring for unexpected file creation, modification, or child-process activity by the RPC service

Automated security review tools may help identify injection-prone data flows, but findings should be validated against the device's actual request-processing behavior.

Organizations can look for this class of issue through:

  • Static analysis rules identifying string concatenation between request parameters and commands, interpreters, or dynamic code paths
  • Code review checks for file-write handlers that accept unrestricted path values
  • Testing with metacharacter and boundary-case inputs in isolated environments
  • Policy enforcement requiring allowlisted paths and non-shell process execution
  • Runtime monitoring for unexpected file creation, modification, or child-process activity by the RPC service

Automated security review tools may help identify injection-prone data flows, but findings should be validated against the device's actual request-processing behavior.

Sources

SourceLink
github.comgithub.com/XxingGoD/H3C-NX15-R017-Vulns/tree/main/H3C/NX15R017/file_write_root_rce
vuldb.comvuldb.com/cve/CVE-2026-112371
vuldb.comvuldb.com/submit/983538
vuldb.comvuldb.com/vuln/422417
vuldb.comvuldb.com/vuln/422417/cti

Frequently asked

questions

Yes. The reported attack surface is a remotely accessible RPC interface, although successful exploitation still depends on network exposure and any authentication or authorization controls in place.

An attacker needs reachability to the affected endpoint and sufficient ability to submit input to the vulnerable file-write operation. The exact access level depends on deployment and interface controls.

Treat the path value as untrusted data, use safe file APIs, enforce canonical allowlisted paths, and ensure that no user-controlled value is interpreted as code or a command.

Apply strict input validation, separate data from executable operations, limit RPC exposure, enforce least privilege, and include injection-focused static analysis and security testing in the development process.

Yes. The reported attack surface is a remotely accessible RPC interface, although successful exploitation still depends on network exposure and any authentication or authorization controls in place.

An attacker needs reachability to the affected endpoint and sufficient ability to submit input to the vulnerable file-write operation. The exact access level depends on deployment and interface controls.

Treat the path value as untrusted data, use safe file APIs, enforce canonical allowlisted paths, and ensure that no user-controlled value is interpreted as code or a command.

Apply strict input validation, separate data from executable operations, limit RPC exposure, enforce least privilege, and include injection-focused static analysis and security testing in the development process.

Find out what's already
exploitable in your codebase.