CVE-2026-39316
cups: CUPS: Denial of Service and potential arbitrary code execution via use-after-free vulnerability when deleting temporary printers.
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · April 8, 2026
Updated · September 1, 2026
Description
A flaw was found in CUPS, an open-source printing system. This vulnerability, known as a use-after-free, occurs in the CUPS scheduler when temporary printers are automatically removed. The system fails to properly manage memory, leaving a pointer to a freed memory location. An attacker could exploit this to cause the CUPS daemon to crash, leading to a denial of service. In more severe scenarios, this could potentially allow an attacker to execute arbitrary code.
Statement
This Moderate impact vulnerability in CUPS arises from a use-after-free flaw within the scheduler when temporary printers are automatically deleted. Exploitation could lead to a denial of service of the CUPS daemon, and potentially arbitrary code execution. This affects Red Hat systems running CUPS where temporary printers are configured or utilized.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
To mitigate this issue, restrict network access to the CUPS daemon to only trusted hosts or localhost. This can be achieved by configuring firewall rules to block access to TCP port 631 from untrusted networks. For example, using firewalld:
sudo firewall-cmd --permanent --zone=public --remove-port=631/tcp
sudo firewall-cmd --reload
Alternatively, configure CUPS to only listen on localhost by modifying the Listen directive in /etc/cups/cupsd.conf to Listen localhost:631. After modifying the configuration, the CUPS service must be restarted for changes to take effect, which may temporarily interrupt printing services:
sudo systemctl restart cups
CVSS / CWE
CVSS 3.1 · 4CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
CWE-825 · Expired Pointer Dereference