/

CVE-2026-59260

Severity:

HIGH RISK

(8.8)

Privilege Misconfiguration (CWE-269) in OpenWrt Samba4

CVE-2026-59260

Deferred

Vulnerability type

Category:

Privilege Management / Authorization Misconfiguration

CWE:

CWE-269

Impact:

Privilege Escalation to Remote Code Execution

Severity:

HIGH RISK

(8.8)

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 privilege misconfiguration in OpenWrt's luci-app-samba4 grants delegated users the ability to run the Samba daemon with attacker-controlled command-line arguments.

By passing crafted global options to a root smbd process, an authenticated attacker can trigger command execution when Samba processes specific SMB protocol messages.

Affected context

The issue arises in OpenWrt deployments using luci-app-samba4 where the read ACL inadvertently allows file.exec on /usr/sbin/smbd.

This affects setups where authenticated delegated users are permitted to manage or interact with Samba configuration through LuCI or related automation.

The vulnerability becomes meaningful when the smbd process is launched with elevated privileges (commonly root) and trusts command-line options that influence runtime behavior.

Exploit preconditions

  • Attack surface: Authenticated management or delegated user interface for Samba via LuCI or equivalent control paths
  • Required access: Valid credentials with delegated rights sufficient to invoke or influence smbd execution
  • Trigger point: Starting the Samba daemon with caller-controlled command-line options (e.g., global options like message command)
  • Why exploitation is possible: The read ACL grants executable rights on /usr/sbin/smbd and does not restrict or sanitize the command-line arguments that can be passed to a privileged smbd process, enabling untrusted users to configure behavior that leads to command execution.

Why this happens

The root cause is a privilege and access control misconfiguration mapped to CWE-269: Improper Privilege Management.

The luci-app-samba4 read ACL grants file.exec permission on the smbd binary to roles that should not be able to launch or parametrize a root-owned daemon.

By conflating read or delegated management rights with the ability to execute a high-privilege service, the system allows lower-privileged users to inject global runtime options.

Samba's design then honors these options (such as hooks triggered by SMB messages), creating a path from misplaced execution rights to effective code execution.

Potential impact

  • Authenticated attackers may execute arbitrary OS commands with root privileges via Samba's configurable hooks.
  • Attackers could gain persistent control over the device by installing or modifying startup scripts.
  • Compromise of file shares, including reading, modifying, or deleting sensitive data accessible through Samba.
  • Use of the compromised OpenWrt device as a pivot for further attacks within the local network.

General mitigation guidance

Security hardening focuses on tightening privilege boundaries around service execution and configuration:

  • Separate read or delegated configuration permissions from the ability to execute service binaries, particularly when they run as root.
  • Introduce explicit allowlists or fixed templates for command-line arguments used to start privileged daemons, rather than passing user-controlled options through.
  • Treat options that invoke external commands (such as message hooks or notification scripts) as high-risk and either disable them or gate them behind strict administrative roles.
  • Apply least-privilege principles to the Samba daemon and related helper processes, ensuring that unnecessary root-level capabilities are not granted where possible.
  • Regularly review ACLs, role definitions, and LuCI permissions to ensure that executable rights are tightly scoped and aligned with actual operational needs.

How teams detect issues like this

Detection typically combines configuration review and behavioral monitoring:

  • Perform periodic audits of OpenWrt ACLs and LuCI privilege definitions to identify roles that can execute /usr/sbin/smbd or other high-privilege binaries.
  • Use static configuration analysis to flag cases where user or delegated roles can influence command-line parameters for system daemons.
  • During code review, treat any path that constructs daemon command lines from user input as a high-risk pattern, requiring validation or hard-coding of safe options.
  • Employ logging and monitoring to track unexpected smbd restarts, unusual global options, or invocation of message command–like hooks, correlating them with user actions.
  • Where feasible, integrate automated policy enforcement tools that can detect and prevent privilege escalation paths in router or appliance configurations.

Sources

SourceLink
github.comgithub.com/openwrt/luci/security/advisories/GHSA-vx64-mmp7-h36c
vulncheck.comvulncheck.com/advisories/openwrt-luci-app-samba4-read-acl-remote-code-execution-via-smbd

Frequently asked

questions

It is not typically exploitable by unauthenticated external users.

Exploitation generally requires authenticated access to the OpenWrt management interface or delegated roles that can interact with Samba's execution paths.

The attacker must possess valid credentials with delegated permissions that allow them to execute or influence /usr/sbin/smbd through luci-app-samba4 or equivalent mechanisms.

Without these privileges, the attack path is significantly constrained.

The safest pattern is to remove executable rights on privileged service binaries from non-administrative roles and to ensure that only tightly controlled, predefined command-line arguments are used when launching daemons.

Additionally, high-risk runtime hooks such as message commands should be restricted to trusted administrators or disabled where not required.

Future prevention relies on designing and enforcing a clear separation of duties between configuration viewing, editing, and service execution.

Implement systematic reviews of ACLs and role capabilities, adopt least-privilege by default, and treat any feature that maps user-configurable options to command execution as a security-sensitive area requiring explicit validation and hardening.

Find out what's already
exploitable in your codebase.