Symlink Attack in CUPS pstopdf Temporary File Handling
CUPS 1.3.8's pstopdf filter creates the /tmp/pstopdf.log temporary file in an insecure manner, allowing local users to perform a symlink attack. By pre-creating a symbolic link at /tmp/pstopdf.log pointing to an arbitrary file, an attacker can cause pstopdf to overwrite that file when it writes logs, leading to potential data loss or privilege escalation. This is distinct from the earlier CVE-2001-1333 issue.
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
A local attacker can overwrite arbitrary files on the system with the privileges of the user running the pstopdf process (typically the CUPS daemon, which may run as root). This can lead to privilege escalation, denial of service, or data corruption, depending on the file targeted.
If you can’t patch tonight, do this now.
Restrict local access to the system to trusted users only until the patch is applied. Monitor /tmp for suspicious symlinks and consider mounting /tmp with the 'noexec' and 'nosuid' options to limit exploitation. Regularly audit the system for unauthorized file modifications.
Patch, then assume compromise.
Upgrade to a version of CUPS where pstopdf uses secure temporary file creation mechanisms (such as mkstemp or O_TMPFILE) to avoid predictable file names and symlink attacks. Alternatively, apply vendor patches addressing this issue.
No validated public exploits yet. Hidden: 1 not yet analyzed, such as Exploit-DB entries.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
No public activity tracked yet. Mallory keeps watching.
No public activity observed for this vulnerability.