Libinput's Lua-based plug-in system, introduced in version 1.30, contains two serious security vulnerabilities that could allow attackers to gain unrestricted system access through malicious input device configurations.
The Linux input handling library libinput has been hit by two critical security vulnerabilities in its Lua plug-in system, raising serious concerns for millions of Linux desktop users who rely on this component for keyboard, mouse, and touchpad functionality.

The Lua Plug-In System and Its Promise
Libinput introduced Lua-based plug-in support with version 1.30 last year, aiming to provide flexibility for modifying device behavior and event handling without requiring core library changes. This feature allowed developers and advanced users to customize input device behavior through Lua scripts, theoretically enabling sophisticated input device configurations and custom event processing.
The system was designed to work seamlessly across both X.Org and Wayland environments, making it a universal solution for Linux desktop input handling. However, this very universality has made the security flaws particularly concerning, as libinput serves as the foundation for input processing across virtually all modern Linux desktop environments.
CVE-2026-35093: The Sandbox Escape
The first vulnerability, CVE-2026-35093, represents a severe sandbox escape flaw in libinput's plug-in loader. The core issue lies in the loader's failure to verify pre-compiled Lua bytecode at runtime. This oversight allows malicious plug-ins to execute arbitrary code with the full privileges of the libinput process.
What makes this particularly dangerous is that Lua bytecode can contain complex logic and system calls that bypass normal security restrictions. An attacker who can install a malicious libinput plug-in could potentially gain complete control over the system, accessing files, modifying configurations, and executing commands with the same privileges as the input handling daemon.
CVE-2026-35094: The Use-After-Free Vulnerability
The second vulnerability, CVE-2026-35094, is a use-after-free flaw in the plug-in system. While the specific technical details haven't been fully disclosed, use-after-free vulnerabilities typically allow attackers to manipulate memory after it has been freed, potentially leading to arbitrary code execution, information disclosure, or system crashes.
Use-after-free bugs are particularly insidious because they can be triggered through various attack vectors, including specially crafted input events or malicious plug-ins that exploit the timing between memory allocation and deallocation.
The Scope of the Problem
These vulnerabilities affect any system running libinput 1.30 through 1.31.0, which encompasses a vast majority of Linux desktop installations. The fact that libinput is used by both X.Org and Wayland means that users of traditional desktop environments like GNOME, KDE, and XFCE, as well as modern Wayland compositors, are all potentially affected.
For enterprise environments and Linux distributions, this represents a significant security challenge. Input handling is a fundamental system service, and compromising it could provide attackers with a powerful foothold for further exploitation.
The Fix and Mitigation
In response to these disclosures, the libinput development team has released two security updates:
- libinput 1.31.1 - The latest stable release with both vulnerabilities patched
- libinput 1.30.3 - A security backport for the previous stable series
Users are strongly advised to update their systems immediately. Most major Linux distributions should be pushing these updates through their package management systems within the next 24-48 hours.
Broader Implications for Linux Security
This incident highlights the ongoing challenges in securing complex input systems on Linux. The introduction of dynamic plug-in systems, while providing valuable flexibility, also expands the attack surface significantly. Security researchers and developers will likely scrutinize similar systems in other Linux components more carefully in the future.
The fact that these vulnerabilities were discovered relatively quickly after the Lua plug-in system's introduction suggests that the security community is actively monitoring new features in core Linux components. However, it also raises questions about the security review process for new features in widely-used system libraries.
Looking Forward
Moving forward, the libinput project will need to implement more rigorous security measures for its plug-in system. This may include:
- Runtime verification of plug-in bytecode
- Sandboxing mechanisms for plug-in execution
- More comprehensive security audits for new features
- Improved documentation for secure plug-in development
For users and administrators, this serves as a reminder that even fundamental system components like input handling require regular security updates and monitoring. The interconnected nature of modern Linux desktop environments means that vulnerabilities in core libraries can have far-reaching consequences.
As the Linux desktop continues to evolve with more sophisticated features and customization options, balancing flexibility with security will remain an ongoing challenge for developers and the broader open-source community.

Comments
Please log in or register to join the discussion