OpenWrt procd PATH Environment Variable Filter Bypass via Incorrect String Comparison Leads to Privilege Escalation
OpenWrt Project is a Linux operating system targeting embedded devices. In versions prior to 24.10.6, a vulnerability in the hotplug_call function allows an attacker to bypass environment variable filtering and inject an arbitrary PATH variable, potentially leading to privilege escalation. The function is intended to filter out sensitive environment variables like PATH when executing hotplug scripts in /etc/hotplug.d, but a bug using strcmp instead of strncmp causes the filter to compare the full environment string (e.g., PATH=/some/value) against the literal "PATH", so the match always fails. As a result, the PATH variable is never excluded, enabling an attacker to control which binaries are executed by procd-invoked scripts running with elevated privileges. This issue has been fixed in version 24.10.6.
References
Affected products
- ==< 24.10.6
Matching in nixpkgs
pkgs.terraform-providers.openwrt
None
pkgs.python312Packages.openwrt-luci-rpc
Python module for interacting with the OpenWrt Luci RPC interface
pkgs.python312Packages.openwrt-ubus-rpc
Python API for OpenWrt ubus RPC
pkgs.python313Packages.openwrt-luci-rpc
Python module for interacting with the OpenWrt Luci RPC interface
pkgs.python313Packages.openwrt-ubus-rpc
Python API for OpenWrt ubus RPC
pkgs.python314Packages.openwrt-luci-rpc
Python module for interacting with the OpenWrt Luci RPC interface
pkgs.python314Packages.openwrt-ubus-rpc
Python API for OpenWrt ubus RPC
Package maintainers
-
@matt-snider Matt Snider <matt.snider@protonmail.com>
-
@fabaff Fabian Affolter <mail@fabian-affolter.ch>