FreeBSD VuXML: Documenting security issues in FreeBSD and the FreeBSD Ports Collection

cups-filters -- remote code execution

Affected packages
cups-filters < 1.28.17_6
cups < 2.4.11

Details

VuXML ID 24375796-7cbc-11ef-a3a9-001cc0382b2f
Discovery 2024-09-26
Entry 2024-09-27
Modified 2024-10-02

OpenPrinting reports:

Due to the service binding to *:631 ( INADDR_ANY ), multiple bugs in cups-browsed can be exploited in sequence to introduce a malicious printer to the system. This chain of exploits ultimately enables an attacker to execute arbitrary commands remotely on the target machine without authentication when a print job is started. Posing a significant security risk over the network. Notably, this vulnerability is particularly concerning as it can be exploited from the public internet, potentially exposing a vast number of systems to remote attacks if their CUPS services are enabled.

The vulnerability allows an attacker on the internet to create a new printer device with arbitrary commands in the PPD file of the printer. Attacks using mDNS on the local network can also replace an existing printer. The commands are executed when a user attempts to print on the malicious device. They run with the privileges of the user "cups".

It is recommended to disable the cups_browsed service until patches become available. On FreeBSD this is the default. You can check the status and disable the service with the following commands:

# service cups_browsed status
# service cups_browsed stop
# service cups_browsed disable

If you choose to leave the service enabled, attacks from the internet can be blocked by removing the "cups" protocol from the BrowseRemoteProtocols and BrowseProtocols directives in /usr/local/etc/cups/cups-browsed.conf. Attacks using mDNS can be blocked by removing the "dnssd" protocol as well. Access can be limited to specific IP addresses using BrowseAllow, BrowseDeny, and BrowseOrder directives as documented in cups-browsed.conf(5). Then restart the service with the following command:

# service cups_browsed restart

References

CVE Name CVE-2024-47076
CVE Name CVE-2024-47175
CVE Name CVE-2024-47176
URL https://github.com/OpenPrinting/cups-browsed/security/advisories/GHSA-rj88-6mr5-rcw8