CVE-2025-6018

HIGH

pam-config - Local Privilege Escalation via Polkit Bypass

Title source: llm
STIX 2.1

Exploitation Summary

EIP tracks 16 public exploits for CVE-2025-6018. PoCs published by İbrahimsql, MichaelVenturella, muyuanlove.

AI-analyzed exploit summary This exploit leverages CVE-2025-6018 to escalate privileges on Linux systems by manipulating the PAM environment via ~/.pam_environment, allowing unauthorized SystemD session control. It includes vulnerability checks, payload delivery, and an interactive shell for post-exploitation.

Description

A Local Privilege Escalation (LPE) vulnerability has been discovered in pam-config within Linux Pluggable Authentication Modules (PAM). This flaw allows an unprivileged local attacker (for example, a user logged in via SSH) to obtain the elevated privileges normally reserved for a physically present, "allow_active" user. The highest risk is that the attacker can then perform all allow_active yes Polkit actions, which are typically restricted to console users, potentially gaining unauthorized control over system configurations, services, or other sensitive operations.

Exploits (16)

exploitdb WORKING POC
by İbrahimsql · pythonlocallinux
https://www.exploit-db.com/exploits/52386

This exploit leverages CVE-2025-6018 to escalate privileges on Linux systems by manipulating the PAM environment via ~/.pam_environment, allowing unauthorized SystemD session control. It includes vulnerability checks, payload delivery, and an interactive shell for post-exploitation.

Classification
Working Poc 95%
Attack Type
Lpe
Complexity
Moderate
Reliability
Reliable
Target: Linux PAM 1.3.0 - 1.6.0
Auth required
Prerequisites: SSH access with valid credentials · Vulnerable PAM version · Presence of pam_env.so in PAM configuration
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 9 stars
by MichaelVenturella · poc
https://github.com/MichaelVenturella/CVE-2025-6018-6019-PoC

This repository contains a functional Proof of Concept (PoC) for chaining CVE-2025-6018 (PAM/Polkit Active Session Bypass) and CVE-2025-6019 (libblockdev SUID Mount Flaw) to achieve local privilege escalation (LPE) to root on vulnerable Linux systems.

Classification
Working Poc 95%
Attack Type
Lpe
Complexity
Complex
Reliability
Racy
Target: Linux systems with vulnerable PAM/Polkit and libblockdev configurations
Auth required
Prerequisites: Access to a vulnerable Linux system · Ability to compile and transfer files to the target · Active SSH session with manipulated PAM environment variables
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 9 stars
by muyuanlove · poc
https://github.com/muyuanlove/CVE-2025-6018-CVE-2025-6019-Privilege-Escalation-Exploit

This repository contains a privilege escalation exploit for CVE-2025-6018 and CVE-2025-6019, leveraging PAM environment manipulation and XFS filesystem operations to achieve root access. The exploit involves creating a loop device with a crafted XFS image and triggering a race condition to escalate privileges.

Classification
Working Poc 95%
Attack Type
Lpe
Complexity
Moderate
Reliability
Racy
Target: Linux systems with vulnerable PAM and UDisks2 configurations
Auth required
Prerequisites: SSH access to the target system · Ability to upload files · PAM environment manipulation · XFS filesystem tools
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 9 stars
by ibrahmsql · poc
https://github.com/ibrahmsql/CVE-2025-6018

This is a functional privilege escalation exploit for CVE-2025-6018, targeting PAM's pam_env.so module via environment variable injection. It automates vulnerability checks, payload delivery, and privilege escalation testing through SSH.

Classification
Working Poc 95%
Attack Type
Lpe
Complexity
Moderate
Reliability
Reliable
Target: Linux PAM 1.3.0 - 1.6.0
Auth required
Prerequisites: SSH access with valid credentials · Vulnerable PAM version · pam_env.so configured in PAM stack
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 6 stars
by dreysanox · poc
https://github.com/dreysanox/CVE-2025-6018_Poc

This PoC exploits CVE-2025-6018 by poisoning PAM environment variables via SSH to achieve privilege escalation. It automates the process of checking vulnerability conditions, injecting malicious environment variables, and validating the exploit's success.

Classification
Working Poc 95%
Attack Type
Lpe
Complexity
Moderate
Reliability
Reliable
Target: Linux PAM (Pluggable Authentication Modules) version 1.3.0
Auth required
Prerequisites: SSH access with valid credentials · Target system running vulnerable PAM version (1.3.0) · Presence of pam_env.so in PAM configuration
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 3 stars
by 0rionCollector · poc
https://github.com/0rionCollector/Exploit-Chain-CVE-2025-6018-6019

This is a multi-stage exploit chain combining CVE-2025-6018 (PAM environment injection) and CVE-2025-6019 (UDisks2 privilege escalation) to achieve local privilege escalation to root on openSUSE Leap 15.x systems. The exploit creates an XFS image with a SUID bash binary, leverages PAM misconfiguration, and escalates privileges via UDisks2.

Classification
Working Poc 95%
Attack Type
Lpe
Complexity
Complex
Reliability
Reliable
Target: openSUSE Leap 15.x / SUSE systems with vulnerable PAM and UDisks2 configurations
Auth required
Prerequisites: Root access on attacker machine to create XFS image · Target system running vulnerable openSUSE Leap 15.x · Ability to transfer files to target system
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 1 stars
by localh0ste · poc
https://github.com/localh0ste/CVE-2025-6018-and-CVE-2025-6019

This PoC exploits CVE-2025-6018 (PAM environment poisoning) and CVE-2025-6019 (XFS resize privilege escalation) to achieve local privilege escalation (LPE) to root. It involves creating a malicious environment file and a crafted XFS image with a SUID bash binary.

Classification
Working Poc 90%
Attack Type
Lpe
Complexity
Moderate
Reliability
Reliable
Target: pam (1.3.0-1.6.0) and libblockdev (via XFS resize)
Auth required
Prerequisites: Access to a vulnerable PAM version · Ability to create and transfer an XFS image · Local user access on the target system
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 1 stars
by DesertDemons · poc
https://github.com/DesertDemons/CVE-2025-6018-6019

This repository contains a functional proof-of-concept exploit for CVE-2025-6018 and CVE-2025-6019, targeting openSUSE and SUSE Linux Enterprise 15. The exploit chain involves PAM environment variable injection to bypass polkit restrictions, followed by a race condition in udisks2/libblockdev during XFS filesystem resizing to achieve local privilege escalation to root.

Classification
Working Poc 95%
Attack Type
Lpe
Complexity
Moderate
Reliability
Reliable
Target: openSUSE Leap 15.x, SUSE Linux Enterprise Server (SLES) 15 SP1-SP6, SUSE Linux Enterprise Desktop (SLED) 15 SP1-SP6
Auth required
Prerequisites: Access to a vulnerable system with a user account · PAM configured with user_readenv=1 · udisks2 with libblockdev installed · polkit with allow_active: yes for udisks2 actions
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 1 stars
by Goultarde · poc
https://github.com/Goultarde/CVE-2025-6018_CVE-2025-6019_autopwn

This repository contains a functional exploit chain targeting CVE-2025-6018 (PAM environment injection) and CVE-2025-6019 (privilege escalation via UDisks2) on openSUSE Leap 15.x/SUSE systems. The exploit automates the creation of a malicious XFS image, PAM environment poisoning, and remote execution to achieve root access.

Classification
Working Poc 95%
Attack Type
Lpe
Complexity
Moderate
Reliability
Reliable
Target: openSUSE Leap 15.x / SUSE systems (PAM, UDisks2)
Auth required
Prerequisites: Python 3 · paramiko library · sudo access on attacker machine · valid SSH credentials for target
devstral-2 · analyzed Feb 18, 2026 Full analysis →
nomisec WRITEUP 1 stars
by AzureADTrent · poc
https://github.com/AzureADTrent/CVE-2025-6018-and-CVE-2025-6019-Privilege-Escalation

This README provides a high-level guide for exploiting CVE-2025-6018 and CVE-2025-6019 to achieve privilege escalation to root. It references external tools and scripts but does not contain direct exploit code.

Classification
Writeup 90%
Attack Type
Lpe
Complexity
Moderate
Reliability
Theoretical
Target: Azure AD Trent (specific version not specified)
Auth required
Prerequisites: Access to attacker machine with internet · Ability to transfer files to victim · Local execution on victim machine
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 1 stars
by iamgithubber · poc
https://github.com/iamgithubber/CVE-2025-6018-19-exploit

This exploit leverages CVE-2025-6018 to achieve local privilege escalation (LPE) by spoofing a Polkit session and mounting a malicious XFS image containing a SUID-root shell. The attacker serves the image via an HTTP server, and the victim script downloads, mounts, and executes it.

Classification
Working Poc 95%
Attack Type
Lpe
Complexity
Moderate
Reliability
Reliable
Target: Polkit (likely a specific version affected by CVE-2025-6018)
No auth needed
Prerequisites: Victim must execute the victim.sh script · Attacker must host exploit.img on an accessible server · udisks2 and loop device access on the victim system
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC
by e1arth · poc
https://github.com/e1arth/CVE-2025-6018

This repository contains a functional privilege escalation exploit for CVE-2025-6018 and CVE-2025-6019, leveraging a race condition in XFS filesystem handling and PAM environment manipulation to achieve root access.

Classification
Working Poc 95%
Attack Type
Lpe
Complexity
Moderate
Reliability
Racy
Target: Linux systems with XFS and PAM (specific versions not specified)
Auth required
Prerequisites: XFS filesystem support · PAM configuration access · SSH access to target · ability to upload files
devstral-2 · analyzed Mar 02, 2026 Full analysis →
nomisec WORKING POC
by iOxsec · poc
https://github.com/iOxsec/CVE-2025-6018-CVE-2025-6019-Privilege-Escalation-Exploit

This repository contains a functional privilege escalation exploit for CVE-2025-6018 and CVE-2025-6019, leveraging a race condition in XFS filesystem handling and PAM environment manipulation to gain root access. The exploit involves creating a malicious XFS image, uploading it to the target, and executing a script to trigger the vulnerability.

Classification
Working Poc 95%
Attack Type
Lpe
Complexity
Moderate
Reliability
Racy
Target: Linux systems with vulnerable XFS and PAM configurations
Auth required
Prerequisites: SSH access to the target · ability to upload files · PAM environment manipulation · XFS filesystem support
devstral-2 · analyzed Feb 23, 2026 Full analysis →
nomisec WORKING POC
by MaxKappa · poc
https://github.com/MaxKappa/opensuse-leap-privesc-exploit

This is a functional exploit chain for CVE-2025-6018 and CVE-2025-6019, targeting openSUSE Leap 15.6 to escalate privileges from an unprivileged user to root via PAM misconfiguration and UDisks2/libblockdev vulnerabilities.

Classification
Working Poc 100%
Attack Type
Lpe
Complexity
Moderate
Reliability
Racy
Target: openSUSE Leap 15.6 (PAM, UDisks2, libblockdev)
Auth required
Prerequisites: openSUSE Leap 15.6 target · unprivileged user access · pre-created XFS image with SUID bash binary · SSH or local shell access
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC
by matesz44 · poc
https://github.com/matesz44/CVE-2025-6018-19

This PoC exploits two vulnerabilities (CVE-2025-6018 and CVE-2025-6019) to achieve local privilege escalation on SUSE 15 systems. It involves manipulating PAM environment variables and abusing udisks via a crafted XFS image to gain root access.

Classification
Working Poc 95%
Attack Type
Lpe
Complexity
Moderate
Reliability
Reliable
Target: SUSE 15 with PAM and udisks
Auth required
Prerequisites: Local access to a SUSE 15 system · Ability to create an XFS image locally · Presence of vulnerable PAM and udisks configurations
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WRITEUP
by euxem · poc
https://github.com/euxem/Analyse-faille-de-s-curit-CVE-2025-6018-CVE-2025-6019

This repository provides instructions for setting up a vulnerable environment (openSUSE-Leap-15.6) to demonstrate CVE-2025-6018 and CVE-2025-6019. It includes dependencies and setup steps but lacks actual exploit code.

Classification
Writeup 90%
Attack Type
Other
Complexity
Moderate
Reliability
Theoretical
Target: openSUSE-Leap-15.6
No auth needed
Prerequisites: VirtualBox · Vagrant · openSUSE-Leap-15.6 ISO
devstral-2 · analyzed Feb 16, 2026 Full analysis →

References (5)

Core 5
Core References
Third Party Advisory vdb-entry x_refsource_redhat
https://access.redhat.com/security/cve/CVE-2025-6018
Issue Tracking, Third Party Advisory issue-tracking x_refsource_redhat
https://bugzilla.redhat.com/show_bug.cgi?id=2372693
Exploit, Issue Tracking, Third Party Advisory
https://cdn2.qualys.com/2025/06/17/suse15-pam-udisks-lpe.txt

Scores

CVSS v3 7.8
EPSS 0.0130
EPSS Percentile 66.7%
Attack Vector LOCAL
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

CISA SSVC

Vulnrichment
Exploitation poc
Automatable no
Technical Impact total

Details

CWE
CWE-863
Status published
Products (1)
suse/pam-config 1.1.8-24.71.1
Published Jul 23, 2025
Tracked Since Feb 18, 2026