CVE-2025-6020
Rocky Linux vulnerability analysis and mitigation

Overview

A high-severity vulnerability (CVE-2025-6020) was discovered in linux-pam, specifically affecting the pam_namespace module versions 1.7.0 and earlier. The vulnerability was discovered on January 29, 2025, and publicly disclosed on June 17, 2025 (OSS Security, NVD).

Technical details

The vulnerability stems from the pam_namespace module's handling of user-controlled paths without proper protection mechanisms. The issue specifically involves the module accessing files and directories owned by unprivileged users during the polyinstantiation of directories. While the module implements security measures including file descriptor usage and bind mounting, these protections became ineffective for processes operating outside the mount namespace after Linux 3.18. The vulnerability has been assigned a CVSS v3.1 base score of 7.8 (High) with the vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H (OSS Security).

Impact

The vulnerability enables local users to elevate their privileges to root level through multiple symlink attacks and race conditions. This privilege escalation can occur when a user can launch a process outside of the mount namespace created by pamnamespace, allowing them to alter paths on which pamnamespace operates as root (OSS Security).

Mitigation and workarounds

The vulnerability has been fixed in linux-pam version 1.7.1. The fix includes converting functions that operate on user-controlled paths to use file descriptors instead of absolute paths, maintaining the bind-mount protection as a defense-in-depth measure. Users are advised to update their namespace.init script if they use a custom version instead of the distribution-provided one. As a temporary workaround, users can disable pam_namespace or ensure it does not operate on user-controlled paths (OSS Security, Red Hat).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management