CVE-2026-137898: Linux PAM Flaw Gives Local Root

A flaw in Linux PAM, the software that checks passwords and controls logins on most Linux systems, can let an ordinary local user gain root privileges — but only if a system administrator runs a privileged command from a directory the attacker controls. The vulnerability, tracked as CVE-2026-137898, was published on 27 November 2026 and carries a CVSS score of 7.3. Red Hat, which disclosed the flaw, rates its impact as Important.
PAM, short for Pluggable Authentication Modules, is the framework Linux distributions use to handle authentication for logins, sudo and other privileged services. The flaw sits in pam_econf, the part of PAM that reads environment configuration files. When PAM is built with the libeconf library and no vendor directory has been configured, the handler misreads its own search path and starts looking for configuration files in a relative directory inside the current working directory instead of a fixed system location.
How the attack works
The weakness is listed as CWE-427, an uncontrolled search path element. A local attacker with a low-privilege account places crafted environment configuration files in a world-writable location, such as a shared or temporary directory. Nothing happens until an administrator runs a privileged command, for example sudo, from inside that directory. At that point PAM reads the attacker files and loads the malicious variables into the privileged process, handing the attacker a route to root.
Three conditions have to line up: the system must run a PAM build with the vulnerable libeconf integration, the attacker must already hold a local account, and an administrator must run a privileged command from the booby-trapped directory. That chain limits the danger, but it is exactly the kind of chain that works on shared development servers, university machines and multi-user systems where administrators routinely work from shared folders.
Who is actually affected
The scope is narrow, and that is good news for most Linux users. Red Hat says standard Red Hat Enterprise Linux releases are not affected, because the Linux-PAM packages they ship do not include the vulnerable libeconf integration. Red Hat OpenShift Container Platform is also listed as unaffected. The only Red Hat product listed as affected is Red Hat Hardened Images.
Other distributions and custom builds are a different question. Any PAM build compiled with libeconf and shipped without a configured vendor directory carries the same weakness, so administrators running custom or hardened images should check how their PAM was built rather than assuming they are safe because they do not run Red Hat.
What to do now
Red Hat lists no mitigation for this flaw, and no patched release has been published yet. A fix has been proposed upstream in the Linux-PAM project, but until it lands in a release the practical defence is habit: do not run sudo or other privileged commands from world-writable directories, shared folders, extracted archives or anywhere another user could have planted files. Changing into a trusted directory such as your home folder before running a privileged command closes the hole completely.
The flaw was reported by Lidor B., known as thisisczar, whom Red Hat thanked in its advisory. No exploitation in the wild has been confirmed so far, and the flaw needs both a local foothold and an administrator misstep. Even so, it is a reminder that the most dangerous directory on a shared Linux system is often the one you happen to be standing in.