Bug 2585412 (CVE-2026-137898)

Summary: CVE-2026-137898 pam: Linux-PAM pam_econf local privilege escalation via relative "(null)" config directory from empty vendor directory handling
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security DevOps Team <prodsec-dev>
Status: NEW --- QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: akhatavk, aos-team-art-private, asdas, dpaolell, jdelft, jupierce, lgarciaa, mbiarnes, ppalepu, ppostler, prdhamdh, rhel-process-autobot, security-response-team, sghai, sidsharm, suppawar, vlaad, watson-tool-maintainers
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
A flaw was found in pam. When built with libeconf and an unconfigured vendor directory, the pam_econf configuration handler misinterprets the search path, causing it to look for configuration files in a relative directory within the current working directory. A local attacker can exploit this by placing crafted environment configuration files in a world-writable location. If an administrator executes a privileged command from that directory, the malicious variables are loaded into the privileged process, resulting in local privilege escalation.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2585472    
Bug Blocks:    

Description OSIDB Bzimport 2026-11-27 11:33:50 UTC
A flaw was found in Linux-PAM's pam_econf configuration handling. When Linux-PAM is built with libeconf and an empty vendor directory, the search list passed to libeconf becomes "PARSING_DIRS=(null):/etc": the NULL vendor directory is formatted as the literal text "(null)", which libeconf opens as a directory relative to the current working directory. A local user can create a "(null)" directory with environment.d drop-ins in a world-writable folder (e.g. /tmp); when an administrator runs sudo from that folder, pam_env loads the attacker's variables, including LD_PRELOAD, which bypass sudo's env_reset filtering (the PAM environment is merged unconditionally) and reach the command run as root, leading to full local privilege escalation. Confirmed by code review and reproduced end to end (marker payload ran as uid=0 euid=0 via sudo from a world-writable directory) in a Fedora 44 container with the shipped pam 1.7.2-2.fc44; Fedora 43-45 and rawhide are affected, Fedora 42 (EOL) as well. RHEL is not affected (pam 1.5.1/1.6.1 lack the affected code path).