/

CVE-2026-19771

Severity:

HIGH RISK

(7.2)

OS Command Injection (CWE-78) in Baicells LuCI Web Interface

CVE-2026-19771

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-77, CWE-78

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 OS command injection vulnerability in the Baicells EG3661M LuCI Web Interface may allow remote attackers to influence command execution through the MaxHops, Timeout, or Size arguments.

The issue becomes risky when attacker-controlled request parameters reach an operating-system command without sufficiently strict validation, separation, or safe process invocation.

Affected context

The vulnerability occurs in the LuCI Web Interface exposed through /cgi-bin/luci on affected Baicells EG3661M deployments. It appears to involve handling of the MaxHops, Timeout, and Size arguments, although the precise internal function and deployment conditions may vary. Exposure is particularly concerning when the management interface is reachable from an untrusted or broadly accessible network.

Exploit preconditions

  • Attack surface: The LuCI Web Interface at /cgi-bin/luci
  • Required access: Network reachability to the affected web interface; additional authentication requirements depend on the device's access controls
  • Trigger point: Processing of requests containing the MaxHops, Timeout, or Size arguments
  • Why exploitation is possible: User-controlled argument values may reach an operating-system command construction or execution path without adequate validation or safe argument separation

Why this happens

The underlying bug is command injection caused by treating web request parameters as trusted input when constructing or invoking operating-system commands.

If untrusted values are concatenated into shell commands, interpreted by a shell, or insufficiently constrained before process execution, an attacker may alter the intended command behavior. This maps primarily to CWE-78: Improper Neutralization of Special Elements used in an OS Command, with CWE-77: Improper Neutralization of Special Elements in Output Used by a Downstream Component describing the broader injection pattern.

Potential impact

  • An attacker may execute unauthorized operating-system commands
  • Device configuration or service behavior could be altered
  • Sensitive device data may be accessed or modified
  • Network traffic could be disrupted or redirected
  • The device could be used as a foothold for further attacks
  • Persistent compromise could occur if sufficient privileges are available

General mitigation guidance

Mitigation generally focuses on eliminating shell interpretation and reducing trust in web request parameters.

Common defensive patterns include:

  • Replacing shell-based command construction with direct process APIs that pass arguments separately
  • Applying strict allowlists, type validation, and bounded ranges to parameters such as hop counts, timeouts, and sizes
  • Rejecting unexpected characters, formats, and duplicate parameters before business logic runs
  • Running web-facing services with the least privileges required for their functions
  • Restricting management interfaces to trusted administrative networks or access paths
  • Separating device-management capabilities from externally reachable services
  • Logging and reviewing rejected requests and command-execution failures

How teams detect issues like this

Detection approaches may include:

  • Static analysis for string concatenation or interpolation involving request parameters and shell or process execution APIs
  • Code review of handlers processing MaxHops, Timeout, and Size
  • Testing boundary values, malformed types, unexpected delimiters, and shell metacharacters in controlled environments
  • Web application monitoring for unusual requests to /cgi-bin/luci and abnormal parameter combinations
  • Runtime controls that alert on unexpected child-process creation by the LuCI service
  • Policy enforcement requiring allowlisted command arguments and prohibiting shell execution for web-derived input
  • Automated security review tools that flag command construction from untrusted sources

Sources

SourceLink
github.comgithub.com/actuator/cve/blob/main/Baicells/EG3661M.md
vuldb.comvuldb.com/cve/CVE-2026-19771
vuldb.comvuldb.com/submit/869362
vuldb.comvuldb.com/vuln/389685
vuldb.comvuldb.com/vuln/389685/cti

Frequently asked

questions

The vulnerability is described as remotely exploitable through the LuCI Web Interface. Practical exploitability depends on network exposure, authentication, and other device access controls.

The attacker needs network reachability to the affected interface. Whether authentication is required depends on the device configuration and the specific vulnerable request path.

Avoid shell interpretation, invoke programs through argument-safe APIs, and strictly allowlist and validate every request parameter before it reaches a command or subprocess.

Keep management interfaces isolated, apply least privilege, use secure coding checks for process execution, and include command-injection testing and static analysis in development and deployment reviews.

Find out what's already
exploitable in your codebase.