/

CVE-2026-121260

Severity:

CRITICAL RISK

(9.1)

Code Injection (CWE-94) in Ziroom ZHOME Lua Handler

CVE-2026-121260

Deferred

Vulnerability type

Category:

Code Injection

CWE:

CWE-74, CWE-94

Impact:

Potential remote code execution

Severity:

CRITICAL RISK

(9.1)

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 code injection flaw in the Ziroom ZHOME A0101 Lua Handler involves the use of loadstring in usr/lib/lua/luci/controller/api/zrUsb.lua. If attacker-controlled input can reach this function through the remotely accessible attack surface, it may be evaluated as Lua code and execute with the handler's privileges.

Affected context

The reported issue affects Ziroom ZHOME A0101 1.0.1.0 Build 202004151405, in the Lua Handler at usr/lib/lua/luci/controller/api/zrUsb.lua. The risk exists when data that an attacker can influence is passed to loadstring and evaluated without adequate safeguards. The available description does not specify authentication requirements or the exact request flow.

Exploit preconditions

  • Attack surface: Remote access to the affected Lua Handler
  • Required access: The description does not establish whether authentication is required; access sufficient to reach the relevant handler may be necessary
  • Trigger point: Processing of input that reaches the loadstring call
  • Why exploitation is possible: Dynamically evaluating attacker-influenced input as Lua code can allow code execution

Why this happens

The underlying issue is the dynamic evaluation of input as executable code. Passing untrusted or insufficiently constrained data to loadstring can turn that data into Lua code, matching CWE-94: Improper Control of Generation of Code. This is also related to CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component, because input may be interpreted by a code-processing component rather than treated strictly as data.

Potential impact

  • An attacker may execute Lua code with the privileges of the affected handler
  • The device could be compromised or its configuration altered
  • Sensitive information accessible to the handler could be exposed
  • Device availability or connected services could be disrupted

General mitigation guidance

Defensive patterns focus on preventing untrusted data from becoming executable code. Avoid dynamic evaluation when a fixed set of operations or structured data parsing can meet the requirement. Where dynamic behavior cannot be eliminated, constrain inputs to narrowly defined values, enforce authorization at the handler boundary, and run the component with the least privileges practical. Treat remotely supplied values as untrusted and keep sensitive operations behind explicit validation and access controls.

How teams detect issues like this

Review code for calls to loadstring and other dynamic evaluation functions, especially where arguments originate from request parameters or other externally controlled sources. Static analysis and code review can trace data flows from network-facing handlers to evaluation sinks. Policy checks can flag or prohibit dynamic code evaluation in request-handling paths, and security testing can verify that invalid or unauthorized inputs are rejected before reaching sensitive operations.

Sources

SourceLink
github.comgithub.com/Wlz1112/ZHOME_A0101/blob/main/zrusb_loadstring_code_injection.md
vuldb.comvuldb.com/cve/CVE-2026-121260
vuldb.comvuldb.com/submit/1018328
vuldb.comvuldb.com/vuln/430226
vuldb.comvuldb.com/vuln/430226/cti

Frequently asked

questions

The report describes remote exploitation as possible. Exploitation depends on whether an attacker can reach the affected handler and supply input that reaches loadstring.

The provided description does not specify authentication requirements. Access controls around the relevant handler affect the practical exposure.

Avoid evaluating input as code. Prefer fixed operations or structured parsing, and strictly constrain and validate any data used by the handler.

Review data flows into dynamic evaluation functions, apply least privilege, and use static analysis or policy checks to flag unsafe evaluation in network-facing code.

Find out what's already
exploitable in your codebase.