/

CVE-2026-72842

Severity:

CRITICAL RISK

(9.9)

Path Traversal (CWE-73) in luci-app-lxc OpenWrt

CVE-2026-72842

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-73

Impact:

Root 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 authorization and path-handling vulnerability in luci-app-lxc allows low-privileged authenticated LuCI users to reach container-management routes without consistent access checks. By influencing a container path, an attacker may escape the intended directory boundary and cause host-side scripts to execute with root privileges.

Affected context

The vulnerability occurs in OpenWrt systems running luci-app-lxc when LuCI backend routes process user-controlled container identifiers or filesystem paths. Risk is increased when ACL enforcement differs between frontend and backend routes and when host-side LXC hook scripts are executed with elevated privileges.

Exploit preconditions

  • Attack surface: LuCI web interface and its backend container-management routes
  • Required access: An authenticated LuCI account with low-level privileges
  • Trigger point: Processing of the lxc_name value by backend route and filesystem operations
  • Why exploitation is possible: Inconsistent ACL checks permit access to sensitive functionality, while insufficient path boundary enforcement may allow a supplied name to resolve outside the intended container directory
  • Privilege boundary: Host-side LXC hook scripts may run with root privileges

Why this happens

The underlying issue combines inconsistent authorization enforcement with external control of a filesystem path. Backend routes do not uniformly apply the permissions expected by the LuCI interface, and the lxc_name value is used without sufficiently canonicalizing and constraining the resulting path to an approved container directory. This behavior maps primarily to CWE-73: External Control of File Name or Path, with the authorization inconsistency increasing the reachable impact.

Potential impact

  • An attacker may access container-management operations beyond their assigned privileges
  • Host-side files or scripts may be modified or selected outside the intended directory
  • Root-level code execution on the OpenWrt host could occur
  • Network configuration, credentials, and other hosted services may be exposed
  • Compromise could enable persistence, lateral movement, or service disruption

General mitigation guidance

Mitigation generally focuses on enforcing authorization at every backend route and treating container identifiers as untrusted input.

Common defensive patterns include:

  • Applying centralized, deny-by-default ACL checks to all container-management endpoints
  • Resolving paths canonically and requiring them to remain within an approved base directory
  • Using identifiers mapped to server-side records instead of accepting filesystem paths directly
  • Rejecting traversal and ambiguous path representations before filesystem access
  • Separating host-side hook execution from user-controlled data and minimizing hook privileges
  • Running management components with the least privileges required

How teams detect issues like this

Organizations can identify similar issues through:

  • Static analysis for filesystem operations using request parameters or unsanitized identifiers
  • Code review checks confirming authorization on every backend route, independent of frontend visibility
  • Tests involving canonicalization, encoded separators, alternate path representations, and directory-boundary enforcement
  • Runtime logging and alerting for unauthorized route access, abnormal container names, and writes outside approved directories
  • Policy enforcement requiring centralized authorization middleware and path-validation helpers
  • Automated security review tools that flag external path control and missing access checks

Sources

SourceLink
github.comgithub.com/openwrt/luci/security/advisories/GHSA-jf59-v86x-fwf2
vulncheck.comvulncheck.com/advisories/openwrt-luci-app-lxc-acl-inconsistency-authentication-bypass

Frequently asked

questions

It can be exploitable through the LuCI web interface when the attacker can reach the interface and has a valid authenticated account with sufficient access to the affected routes.

No. The described condition involves a low-privileged authenticated LuCI user, although deployment-specific ACLs and network exposure affect practical exploitability.

Enforce authorization consistently in backend handlers, canonicalize and constrain all filesystem paths to approved directories, and prevent user-controlled values from selecting privileged host-side scripts.

Use deny-by-default route authorization, server-side identifier mapping, strict path-boundary validation, least-privilege execution, and automated tests for encoded and canonicalization-based traversal cases.

Find out what's already
exploitable in your codebase.