Cloudanix VulnDB

CVE-2025-8941

High · 7.8

CVSS

7.8

EPSS

0.3%

Published

Aug 13, 2025

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A problem in the way some Linux systems handle user login settings could let someone already on the computer take over the entire machine as an administrator.

Exploitation
Local Privilege
Attacker needs
Local User
Complexity
Moderate
Impact
Privilege Gain
Component
Library
Class
Privilege Escalation
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

The pam_namespace module in linux-pam fails to safely handle user-controlled paths, enabling symlink attacks combined with race conditions that allow local privilege escalation to root.

Why it matters to the business

Local users on affected systems can obtain full administrative control, potentially leading to complete system compromise, data theft, or unauthorized configuration changes; the issue affects common Linux authentication components with moderate ecosystem reach.

How an attack unfolds

An authenticated local attacker creates malicious symlinks and races the pam_namespace module during session initialization to redirect privileged operations, achieving root access without needing network interaction or additional privileges.

How to fix it

Upgrade linux-pam to a version containing the complete fix for this issue; for the listed packages apply mingw32-sqlite (AlmaLinux:8) 3.26.0.0-2.el8_10, mingw32-sqlite-static (AlmaLinux:8) 3.26.0.0-2.el8_10, mingw64-sqlite (AlmaLinux:8) 3.26.0.0-2.el8_10, and mingw64-sqlite-static (AlmaLinux:8) 3.26.0.0-2.el8_10.

How to confirm the fix worked

Verify installed package versions match or exceed the fixed releases, review pam.d and namespace configuration files for unsafe path handling, and test that symlink-based escalation attempts are blocked under concurrent access.

Typical attack path

  1. Obtain a local user account on the target system
  2. Craft symlink and race-condition payloads targeting pam_namespace path handling
  3. Trigger PAM session setup or login to activate the module
  4. Exploit the window to elevate privileges to root

How to detect it

Review authentication logs and PAM module traces for unexpected path redirections or failures during session setup; examine system call traces for symlink creation immediately before elevated process spawns.

What your security team should do

  • Apply the listed fixed package versions immediately on all affected systems
  • Audit local accounts and PAM configurations for unnecessary namespace module usage
  • Monitor for future related updates as this resolves a prior incomplete fix

The record

A flaw was found in linux-pam. The pam_namespace module may improperly handle user-controlled paths, allowing local users to exploit symlink attacks and race conditions to elevate their privileges to root. This CVE provides a "complete" fix for CVE-2025-6020.

Affected packages

Ecosystem Package Introduced Fixed
AlmaLinux:9 pam 0 1.5.1-26.el9_6
AlmaLinux:9 pam-devel 0 1.5.1-26.el9_6
AlmaLinux:9 pam-docs 0 1.5.1-26.el9_6
Debian:11 pam 0 No fix
Debian:12 pam 0 No fix
Debian:13 pam 0 No fix
Debian:14 pam 0 No fix

Related vulnerabilities