Executive brief
pam_usb is a tool that allows users to log into Linux systems using a USB drive instead of a password. A security flaw in how it reads its configuration file could allow an attacker who already has high-level access to the system to read sensitive local files or trigger unauthorized network connections. This is particularly serious because the software runs with elevated system privileges during the login process.
Technical details
The pam_usb module fails to disable external entity expansion when calling libxml2's xmlReadFile() function, using flags=0. This leads to an XML External Entity (XXE) vulnerability. An attacker with write access to the root-owned pam_usb.conf can insert malicious entity references. Because pam_usb.so is executed within privileged setuid contexts (such as sudo or su), this allows for the reading of sensitive local files or the initiation of outbound network requests from a highly privileged process. The issue is resolved in version 0.9.2 by passing explicit parser flags to block external entity expansion.
Affected products
- mcdope pam_usb < 0.9.2
Timeline
- 2023-05-23: patched: Version 0.9.2 released
- 2026-05-24: advisory: GitHub Security Advisory published
- 2026-06-18: disclosed: CVE-2026-48981 published to NVD