# CVE-2025-6018: SUSE and Red Hat PAM local privilege escalation in pam-config

Source: https://junglewise.ai/threats/cve-2025-6018-suse-and-red-hat-pam-local-privilege-escalation-in-pam-config  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2025-07-23. Updated: 2026-06-25  
License: CC BY 4.0 with a link back

CVE-2025-6018 · Severity: high · CVSS 7.8 · Published 2025-07-23

A security vulnerability has been identified in the authentication system of several Linux distributions, including SUSE and Red Hat. This flaw allows a local user, such as someone logged in remotely via SSH, to trick the system into believing they are physically present at the computer console. By doing so, the attacker can bypass security restrictions and perform sensitive administrative actions—like rebooting the system or changing configurations—that are normally reserved only for users with physical access to the machine.

Technologies: [Red Hat Enterprise Linux 7](https://junglewise.ai/threats/technologies/enterprise-linux-7), [Red Hat Enterprise Linux 8](https://junglewise.ai/threats/technologies/enterprise-linux-8), [Red Hat Enterprise Linux 9](https://junglewise.ai/threats/technologies/enterprise-linux-9). Vendors: [Red Hat](https://junglewise.ai/threats/vendors/red-hat), [Suse](https://junglewise.ai/threats/vendors/suse).

## Quick answers

**Is CVE-2025-6018 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2025-6018 being exploited in the wild.

**How severe is CVE-2025-6018?** High severity, with a CVSS score of 7.8, published 23 July 2025.

**Which products and versions are affected?** Suse openSUSE Leap 15 All versions prior to pam-1.1.8-24.71.1; SUSE Linux Enterprise 15 All versions prior to pam-1.1.8-24.71.1.

**Is there a fix for CVE-2025-6018?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2025-6018 attacked?** It is attacked with local access, in an operating system.

**Am I affected by CVE-2025-6018?** Check whether you run Red Hat Enterprise Linux 7, Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9 or one of the others listed at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

A Local Privilege Escalation (LPE) vulnerability exists in the PAM (Pluggable Authentication Modules) configuration of SUSE 15 and other Linux distributions. The root cause is the 'pam_env' module reading a user's '~/.pam_environment' file by default during the 'auth' stack, before 'pam_systemd' is called in the 'session' stack. An unprivileged attacker can define environment variables like 'XDG_SEAT=seat0' and 'XDG_VTNR=1' in their local environment file. When 'pam_systemd' later retrieves these variables via 'pam_getenv()', it incorrectly identifies the remote session as a local, active console session. This grants the attacker 'allow_active' Polkit privileges, enabling them to execute restricted system actions. Patches are available for affected SUSE versions (e.g., pam-1.1.8-24.71.1).

## Affected products

- SUSE SUSE Linux Enterprise 15 All versions prior to pam-1.1.8-24.71.1
- SUSE openSUSE Leap 15 All versions prior to pam-1.1.8-24.71.1
- Red Hat Red Hat Enterprise Linux 7
- Red Hat Red Hat Enterprise Linux 8
- Red Hat Red Hat Enterprise Linux 9

## Timeline

- 2025-05-15: other: Vulnerability reported to SUSE
- 2025-06-17: disclosed: Public disclosure via oss-security mailing list
- 2025-07-23: advisory: NVD publication date

## References

- [https://packagehub.suse.com/](https://packagehub.suse.com/)
- [https://access.redhat.com/downloads/content/package-browser/](https://access.redhat.com/downloads/content/package-browser/)
- [https://access.redhat.com/security/cve/CVE-2025-6018](https://access.redhat.com/security/cve/CVE-2025-6018)
- [https://bugzilla.redhat.com/show_bug.cgi?id=2372693](https://bugzilla.redhat.com/show_bug.cgi?id=2372693)
- [https://bugzilla.suse.com/show_bug.cgi?id=1243226](https://bugzilla.suse.com/show_bug.cgi?id=1243226)
- [https://cdn2.qualys.com/2025/06/17/suse15-pam-udisks-lpe.txt](https://cdn2.qualys.com/2025/06/17/suse15-pam-udisks-lpe.txt)
- [http://www.openwall.com/lists/oss-security/2025/08/28/4](http://www.openwall.com/lists/oss-security/2025/08/28/4)

## Related threats

- [Samba AD DC LDAP filter injection and ACL bypass in Compare requests](https://junglewise.ai/threats/cve-2026-58222-samba-ad-dc-ldap-filter-injection-and-acl-bypass-in-compare)
- [Samba KDC out-of-bounds read in kpasswd service](https://junglewise.ai/threats/cve-2026-58216-samba-kdc-out-of-bounds-read-in-kpasswd-service)
- [Samba internal DNS server denial of service via TKEY cache exhaustion](https://junglewise.ai/threats/cve-2026-58218-samba-internal-dns-server-denial-of-service-via-tkey-cache)
- [Red Hat PCP auth bypass in pmproxy /store endpoint](https://junglewise.ai/threats/cve-2026-16527-red-hat-pcp-auth-bypass-in-pmproxy-store-endpoint)
- [Red Hat PCP privilege escalation in linux_sockets PMDA](https://junglewise.ai/threats/cve-2026-16526-red-hat-pcp-privilege-escalation-in-linux-sockets-pmda)
