Category: IT|Sep 27, 2024 | Author: Admin

CUPS flaws enable Linux remote code execution, but there’s a catch

Share on

Under certain conditions, attackers can chain a set of vulnerabilities in multiple components of the CUPS open-source printing system to execute arbitrary code remotely on vulnerable machines.

CUPS flaws enable Linux remote code execution, but there’s a catch

Tracked as CVE-2024-47076 (libcupsfilters), CVE-2024-47175 (libppd), CVE-2024-47176 (cups-browsed) and CVE-2024-47177 (cups-filters) and discovered by Simone Margaritelli, these security flaws don't affect systems in their default configuration.

 

CUPS (short for Common UNIX Printing System) is the most widely used printing system on Linux systems, and it is also generally supported on devices running Unix-like operating systems such as FreeBSD, NetBSD, and OpenBSD and their derivates.

 

One of its components is the cups-browsed daemon, which searches the local network for advertised network or shared printers and makes them available for printing on the machine. This is similar to how Windows and Macs can search the network for remote network printers to print to.

 

Margaritelli found that if the cups-browsed daemon is enabled, which is not on most systems, it will listen on UDP port 631. It will also, by default, allow remote connections from any device on the network to create a new printer.

 

He discovered he could create a malicious PostScript Printer Description (PPD) printer that could be manually advertised to an exposed cups-browsed service running on UDP port 631.

 

This causes the remote machine to automatically install the malicious printer and make it available for printing. If the user on that exposed server prints to the new printer, the malicious command in the PPD will be executed locally on the computer.

 

The command to execute when printing is added through a foomatic-rip filter, which executes commands on a device so that a print job is rendered correctly.

 

 Commands added using the foomatic-rip filter (Simone Margaritelli)
Limited world impact


While this is a remote code execution chain, it should be noted from the start that attackers must overcome some obstacles to exploit the vulnerabilities and actually achieve remote code execution.

 

The first is that the targeted systems must have the cups-browsed daemon enabled, which is usually not enabled by default, to expose their UDP ports on a network. Then, the attacker has to trick a user into printing from a malicious printer server on their local network that suddenly appears on their machine.

 

"It is a chain of bugs that rely on spoofing a printer in your local network that is automatically added via network discovery if it is turned on at all - usually not in its default configuration. Then an unverified variable that is used to exploit other vulnerabilities in the CUPS system to execute code, but only when a print job is triggered," said Ilkka Turunen, Field CTO at Sonatype.

 

"Good news then - it’s an RCE but with several mitigations, including the fact the attacker needs to be able to connect to a computer via UDP which is widely disabled on network ingress and the service is usually not on by default. It seems like the real world impact is low."

 

For these reasons, Red Hat has rated the flaws as having an "Important" severity impact instead of critical.

 

While BleepingComputer's tests showed that most of our Linux servers did not have the service enabled by default, one of our Ubuntu VMs did. Others have also noted on Twitter that cups-browsed was enabled by default on their Linux devices.

 

No patches, but mitigation measures are available


While patches are still in development, Red Hat shared mitigation measures requiring admins to stop the cups-browsed service from running and prevent it from being started on reboot using the following commands to break the exploit chain:

 

sudo systemctl stop cups-browsed
sudo systemctl disable cups-browsed

Red Hat users can also use the following command to find out if cups-browsed is running on their systems:

 

sudo systemctl status cups-browsed


If the result displays "Active: inactive (dead)," then the exploit chain is halted, and the system is not vulnerable. If the result shows "running" or "enabled," and the "BrowseRemoteProtocols" directive contains the value "cups" in the configuration file

/etc/cups/cups-browsed.conf, then the system is vulnerable.

Sponsored Ads:

Comments:


Cloudflare-12-06-25.png

Google Cloud and Cloudflare hit by widespread service outages

Category: IT|Jun 12, 2025 | Author: Admin
Outlook-11-06-25.png

Microsoft Outlook to block more risky attachments used in attacks

Category: Microsoft|Jun 11, 2025 | Author: Admin
Google_headpic-10-06-25.png

Google patched bug leaking phone numbers tied to accounts

Category: Google|Jun 10, 2025 | Author: Admin
Vodafone-headpic-09-06-25.png

Germany fines Vodafone $51 million for privacy, security breaches

Category: IT|Jun 9, 2025 | Author: Admin
Microsoft_logo-08-06-25.png

Microsoft unveils free EU cybersecurity program for governments

Category: Microsoft|Jun 8, 2025 | Author: Admin
FBI__headpic-07-06-25.jpg

Play ransomware breached 900 victims, including critical orgs

Category: IT|Jun 7, 2025 | Author: Admin
Cisco-06-06-25.png

Cisco warns of ISE and CCP flaws with public exploit code

Category: IT|Jun 6, 2025 | Author: Admin
Tu-160_strategic_bomber_aircraft-05-06-25.png

Ukraine claims it hacked Tupolev, Russia’s strategic warplane maker

Category: General|Jun 5, 2025 | Author: Admin
salesforce-04-06-25.png

Hackers target Salesforce accounts in data extortion attacks

Category: Google|Jun 4, 2025 | Author: Admin
logo.png

Mozilla launches new system to detect Firefox crypto drainer add-ons

Category: IT|Jun 3, 2025 | Author: Admin
Google_Chrome-02-06-25.png

Google Chrome to distrust Chunghwa Telecom, Netlock certificates in August

Category: Google|Jun 2, 2025 | Author: Admin
Cisco-logo-01-06-25.png

Exploit details for max severity Cisco IOS XE flaw now public

Category: IT|Jun 1, 2025 | Author: Admin
firefox-header-31-05-25.png

Mozilla releases Firefox 139.0.1 update to fix artifacts on Nvidia GPUs

Category: IT|May 31, 2025 | Author: Admin
microsoft-notepad-30-05-25.png

Microsoft now testing Notepad text formatting in Windows 11

Category: Microsoft|May 30, 2025 | Author: Admin
Windows_11_headpic-29-05-25.png

Windows 11 might fail to start after installing KB5058405

Category: Microsoft|May 29, 2025 | Author: Admin
more