📦 CUPS
What is it?
- Concept: The Common UNIX Printing System — the standard printing stack on Linux/Unix. The scheduler
cupsdtypically runs as root, listening on631/tcp(IPP) and the local domain socket/run/cups/cups.sock; the default bind is127.0.0.1:631. - Impact: Because
cupsdis root and accepts printer/queue definitions, bugs tend to yield local privilege escalation (arbitrary root file write/overwrite) and, historically, remote RCE viacups-browsed.
How it works
- Clients speak IPP to
cupsd(HTTP-like, over TCP 631 or the unix socket). - Admin operations (create printer, set device URI) need authorization; requests over the local socket / loopback can obtain an
Authorization: Localtoken. - A printer has a device URI (
ipp://,socket://,file://, …). Printing sends the job to that backend — afile://backend writes the job data to a path as root.
Security Quirks & Niche Facts
- Fingerprint the version (the vuln is version-specific and the banner won’t tell you):
dpkg -l | grep cups # Debian/Ubuntu package version ls /etc/ld.so.conf.d/ | grep -i cups # e.g. cups2416.conf hints at the build ss -tulnp | grep 631 # confirm cupsd is listening (often localhost-only) FileDevice Nois the default incupsd.confand normally blocksfile://device URIs — exploits work by bypassing this policy.
Notes
- A root daemon bound to
127.0.0.1:631is a classic “local service analysis” privesc surface. Whenever you land an unprivileged shell with no sudo/SUID path, enumerate localhost services (ss -tulnp) and version-check CUPS. - External
nmapwon’t see a localhost-onlycupsd— you only find it from inside the box.
Mitigation
- Fix: Patch CUPS; keep
FileDevice No; disable/firewallcups-browsedand port 631 where printing isn’t needed; tighten the CUPS admin policy.
Related Usage
| File | Created |
|---|---|
| HTB Machine - Layover | October 04, 2026 |
References:
- CVE-2026-34990 PoC: https://github.com/predyy/CVE-2026-34990