CUPS Zero‑Day RCE

CUPS Zero‑Day RCE Attack? AccuKnox Blocks It Live

 |  Edited : November 18, 2025

Discover how AccuKnox leverages eBPF technology to provide runtime protection against the critical CUPS zero-day vulnerability chain (CVE-2024-47175-47177), enabling real-time defense while organizations await official patches.

Reading Time: 5 minutes

TL;DR

  • CUPS printing system has critical zero-day vulnerabilities that allow remote attackers to execute code without authentication through malicious printer broadcasts.
  • Four CVEs work together in a chain (CVE-2024-47175 through 47177) affecting libppd, cups-filters, cups-browsed, and foomatic-rip components for complete system compromise.
  • AccuKnox uses eBPF runtime security to block UDP traffic on port 631, preventing the initial attack vector without needing to patch the vulnerable CUPS binaries.
  • Real-time protection works immediately by creating KubeArmor policies that stop malicious printer discovery broadcasts while maintaining normal printing functionality.
  • This approach provides immediate defense for organizations that cannot quickly patch their systems, offering a clean and reversible security solution until official fixes are deployed.

Why Do CUPS Zero‑Day RCE Attacks Deserve a Closer Look?

The Common UNIX Printing System (CUPS) has long served as the default printing service on Unix-like systems, including Linux and BSD. While often overlooked, it runs with elevated privileges, binds to the network, and processes untrusted files like PostScript and PPDs, making it a rich target for attackers.

On September 26, 2024, researcher Simone Margaritelli (@evilsocket) disclosed a chain of zero-day vulnerabilities in CUPS and its auxiliary components (cups-browsed, cups-filters). These flaws enable unauthenticated remote code execution (RCE) on affected systems, bypassing authentication and traditional endpoint defenses.

This post takes you through:

  • The technical breakdown of the vulnerability chain.
  • A PoC walkthrough of a full exploit.
  • How does AccuKnox runtime security block these attacks in real time?

CVEs Breakdown: The CUPS Zero‑Day RCE Chain

CVE ID Package Name Description
CVE-2024-47175 libppd and cups The ppdCreatePPDFromIPP2 function fails to sanitize IPP attributes when writing to temporary PPD files. This allows injection of attacker-controlled content, leading to remote code execution during PPD parsing.
CVE-2024-47076 libcupsfilters The cfGetPrinterAttributes5 function does not validate IPP attributes received from printers. This attacker-controlled data is passed to core components, enabling potential remote code execution.
CVE-2024-47176 cups-browsed cups-browsed binds to UDP INADDR_ANY:631, accepting broadcast packets from any source. These can trigger crafted IPP requests to attacker-controlled URLs, resulting in unauthenticated RCE.
CVE-2024-47177 cups-filters The foomatic-rip filter allows execution of arbitrary commands embedded in the FoomaticRIPCommandLine PPD parameter, making it possible to achieve RCE when processing malicious PPD files.

PoC Walkthrough to Exploit CUPS in Kubernetes

To demonstrate the real-world impact of this vulnerability chain, we’ve set up a simulated exploit scenario in a Kubernetes environment with cups-browsed enabled and default configurations. Below is a step-by-step walkthrough of how a remote attacker can achieve unauthenticated remote code execution (RCE) via this attack surface.

Step 1: Deploy Vulnerable CUPS in Kubernetes

We start by deploying a CUPS instance with cups-browsed and vulnerable filters inside a Kubernetes pod.

From Print to Pwn
CUPS Zero‑Day RCE

Step 2: Launch the Exploit PoC

We execute the publicly available proof-of-concept exploit from an attacker pod or external host on the same network.

This PoC:

  1.     Sends a spoofed ipp:// broadcast over UDP port 631.
  2.     Advertises a rogue printer queue.
  3.     Injects a malicious PPD file containing PostScript commands to spawn a shell.
FromPrinttoPwn 3

Step 3: Observe Printer Injection

Return to the CUPS Web Interface (typically available at http://<pod-IP>:631/admin). You’ll now see a new printer auto-created by the exploit. This printer was added by the cups-browsed daemon based on the malicious broadcast we sent earlier.

FromPrinttoPwn 4

Step 4: Trigger the Payload

Click on the newly created printer and select “Print Test Page” from the CUPS interface. This action causes the system to parse and execute the embedded PPD, triggering the exploit.

FromPrinttoPwn 5

Step 5: Confirm Code Execution

The PostScript payload from the PPD runs in the context of the printing daemon. In our PoC, it creates a file:

FromPrinttoPwn 6

Impact Analysis: Why This Chain is Dangerous

  1. Remote, unauthenticated RCE without user interaction in many setups.
  2. Privilege escalation via lpadmin, cupsd, or root context.
  3. Persistence via systemd service abuse, modifying /etc/cups/cupsd.conf.
  4. Ransomware payloads can target document directories, affecting desktop users.
  5. Pivoting into enterprise networks, exploiting the trust in CUPS broadcasts.

Runtime Defense – Hardening CUPS with AccuKnox eBPF Security

Until upstream patches are fully deployed, we can reduce the attack surface of vulnerable systems using eBPF-powered runtime controls. AccuKnox enables fine-grained enforcement without altering the application or kernel source – a pragmatic defense until long-term fixes are in place.

Define a KubeArmor Policy to Block UDP on Port 631

We begin by applying a network-level deny rule for any UDP-based communication, which is how cups-browsed receives rogue printer advertisements. This policy disables the core discovery vector used in the exploit.

apiVersion: security.kubearmor.com/v1
kind: KubeArmorPolicy
metadata:
name: cups-poc
namespace: cups-poc
spec:
selector:
matchLabels:
app: cups
network:
matchProtocols:
- protocol: udp
severity: 1
action: Block
FromPrinttoPwn 7

Re-run the PoC exploit.

We now re-execute the PoC script that previously exploited cups-browsed via UDP-based ipp:// injection.

FromPrinttoPwn 8

Observe the Mitigation in Action

This time, the exploit fails. You’ll see no rogue printers created, and the attacker’s UDP packets receive no response from the pod: This indicates that UDP communication is successfully blocked at runtime, neutralizing the initial entry point of the exploit chain.

Inspect AccuKnox Security Alerts

Navigate to the AccuKnox Dashboard, and open the “Security Events” or “Runtime Alerts” tab.

FromPrinttoPwn 9 1

You’ll see a triggered alert:

  • Policy Name: cups-poc
  • Protocol Blocked: UDP
  • Affected Pod: cups-vulnerable
  • Namespace: cups-poc
  • Time: [timestamp]
  • Action: Block
FromPrinttoPwn 10

Outcome

This runtime policy doesn’t “patch” the binary—it prevents the vulnerability from being reachable, stopping exploitation in real-time until a formal upgrade is safely rolled out. It’s a clean, reversible, low-friction approach to securing workloads – especially critical in environments where patch cycles are slow or constrained (e.g., legacy systems, embedded platforms, and dev clusters).

FromPrinttoPwn 11

Conclusion

The CUPS zero-day vulnerability chain demonstrates how seemingly innocuous system services can become critical attack vectors, but AccuKnox’s eBPF-powered runtime security provides an immediate and effective defense mechanism. By blocking the initial UDP-based attack vector without requiring system patches or downtime, organizations can maintain operational continuity while protecting against sophisticated remote code execution attacks. For a deeper dive into AccuKnox capabilities, Schedule a Demo.

Ready For A Personalized Security Assessment?

“Choosing AccuKnox was driven by opensource KubeArmor’s novel use of eBPF and LSM technologies, delivering runtime security”

idt

Golan Ben-Oni

Chief Information Officer

“At Prudent, we advocate for a comprehensive end-to-end methodology in application and cloud security. AccuKnox excelled in all areas in our in depth evaluation.”

prudent

Manoj Kern

CIO

“Tible is committed to delivering comprehensive security, compliance, and governance for all of its stakeholders.”

tible

Merijn Boom

Managing Director