
Proof-of-concept exploit for CVE-2025-6019, a local privilege escalation in libblockdev/udisks. Creates an XFS image with SUID bash to gain root shell on vulnerable Linux systems.
This repository contains a Proof of Concept (PoC) script for CVE-2025-6019, a Local Privilege Escalation (LPE) vulnerability in libblockdev and udisks. The script creates an XFS filesystem image with an SUID bash binary and exploits the vulnerability to mount it without the nosuid option, allowing a root shell.
WARNING: This PoC is for educational and testing purposes only. Use it only on systems you are authorized to test. Unauthorized use is illegal and unethical.
300 MB XFS image with an SUID bash binary (requires root).Operating System:
kernel 6.6.15-amd64); may work on other Linux distributions with vulnerable udisks2/libblockdev versions (e.g., Kali Linux).dd, mkfs.xfs, mount, umount, udisksctl, gdbus, killall, grep, chmod, cpsudo apt-get install coreutils xfsprogs udisks2 libblockdev-utils$ git clone https://github.com/guinea-offensive-security/CVE-2025-6019
$ cd CVE-2025-6019
$ chmod +x exploit.sh
$ bash exploit.sh
Then generate the xfs.image and transfert it into your victim Machine with the exploit.sh & then execute it with the C flag
sudo zypper install coreutils xfsprogs udisks2 libblockdev[L]ocal mode to create the XFS image.udisks2/libblockdev (specific versions for CVE-2025-6019 are unknown; verify manually).