Snapped HackTheBox Writeup
SUMMARY
Snapped is a Hard-rated Linux machine from HackTheBox Season 10 that chains two sophisticated CVEs to achieve full root access. Virtual host enumeration on snapped.htb reveals an admin subdomain running an Nginx-UI management panel.
The Nginx-UI instance is vulnerable to CVE-2026-27944, an unauthenticated backup exfiltration vulnerability. The /api/backup endpoint returns a full encrypted backup of Nginx and Nginx-UI configuration files while simultaneously leaking the AES decryption key in the X-Backup-Security response header. Decrypting the backup exposes a SQLite database containing a weakly hashed user password, which when cracked grants an initial shell.
Privilege escalation abuses CVE-2026-3888, a TOCTOU race condition between snap-confine and systemd-tmpfiles. After researching the vulnerability, a public exploit on Github was identified and followed to achieve code execution as root.
PATH TO FOLLOW
- Reconnaissance
- Virtual Host Enumeration
- Nginx-UI Unauthenticated Backup (CVE-2026-27944)
- AES Key Extraction from Response Headers
- Backup Decryption and SQLite Credential Extraction
- Initial Shell
- Local Enumeration and snap-confine Analysis
- CVE-2026-3888
- AF_UNIX Socket Backpressure to Win the Race
- Dynamic Linker Hijacking for Root
CONTENT WILL BE RELEASED ONCE THE MACHINE IS RETIRED