CVE-2026-39316

CUPS has a use-after-free in `cupsdDeleteTemporaryPrinters` via dangling subscription pointer

Published Apr 7, 2026 CVSS 3.1 · 4 Medium EPSS < 1% KEV · Not listed
Description
OpenPrinting CUPS is an open source printing system for Linux and other Unix-like operating systems. In versions 2.4.16 and prior, a use-after-free vulnerability exists in the CUPS scheduler (cupsd) when temporary printers are automatically deleted. cupsdDeleteTemporaryPrinters() in scheduler/printers.c calls cupsdDeletePrinter() without first expiring subscriptions that reference the printer, leaving cupsd_subscription_t.dest as a dangling pointer to freed heap memory. The dangling pointer is subsequently dereferenced at multiple code sites, causing a crash (denial of service) of the cupsd daemon. With heap grooming, this can be leveraged for code execution.

Analysis

AI-generated

Technical impact

OpenPrinting CUPS contains a use‑after‑free bug in the function that deletes temporary printers. When cupsdDeleteTemporaryPrinters() frees a printer without expiring subscriptions that reference it, the subscription structure holds a dangling pointer to freed heap memory. Subsequent dereferences of that pointer crash the cups daemon, resulting in a denial of service. With carefully orchestrated heap grooming, this dangling reference can be leveraged for code execution, thereby elevating the threat beyond a simple crash.

Affected Systems

The vulnerability affects installations of OpenPrinting CUPS version 2.4.16 and earlier on Linux and other Unix‑like operating systems. Any system that uses temporary printers that can be automatically deleted is impacted, as the flaw resides in the cups daemon’s scheduler component.

Risk and Exploitability

The CVSS score of 4 indicates a moderate severity. The EPSS score is unavailable and the flaw is not listed in CISA’s KEV catalog. The likely attack vector is local or privileged; an attacker who can create or delete temporary printers can trigger the use‑after‑free, which then causes a crash. Remote exploitation for code execution would require further steps such as heap grooming and privileged access, making it less straightforward to automate.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade OpenPrinting CUPS to the latest release (2.4.17 or later) which fixes the delete‑temporary‑printer bug.
  • Disable the automatic deletion of temporary printers until a patch is applied.
  • Restrict printer creation and deletion to trusted users only.
  • Monitor cups daemon logs for unexpected crashes and apply the vendor patch promptly.

Generated by OpenCVE AI on April 8, 2026 at 13:51 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Ubuntu USN Ubuntu USN USN-8405-1 CUPS vulnerabilities
History
Type Values Removed Values Added
CPEs cpe:2.3:a:openprinting:cups:*:*:*:*:*:*:*:*
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Openprinting
Openprinting cups
Vendors & Products Openprinting
Openprinting cups
Type Values Removed Values Added
Description OpenPrinting CUPS is an open source printing system for Linux and other Unix-like operating systems. In versions 2.4.16 and prior, a use-after-free vulnerability exists in the CUPS scheduler (cupsd) when temporary printers are automatically deleted. cupsdDeleteTemporaryPrinters() in scheduler/printers.c calls cupsdDeletePrinter() without first expiring subscriptions that reference the printer, leaving cupsd_subscription_t.dest as a dangling pointer to freed heap memory. The dangling pointer is subsequently dereferenced at multiple code sites, causing a crash (denial of service) of the cupsd daemon. With heap grooming, this can be leveraged for code execution.
Title CUPS has a use-after-free in `cupsdDeleteTemporaryPrinters` via dangling subscription pointer
Weaknesses CWE-416
References
Metrics cvssV3_1

{'score': 4, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Apr 9, 2026, 3:42 PM
Reserved
Apr 6, 2026, 7:31 PM
Status
Analyzed
Published
Apr 7, 2026, 5:16 PM
Modified
Oct 26, 2026, 10:10 PM
Severity
Moderate
Public date
Apr 7, 2026, 5:00 PM