/

CVE-2026-34990

Severity:

HIGH RISK

(7.8)

Authentication Bypass in OpenPrinting CUPS Admin Interface

CVE-2026-34990

Analyzed

Vulnerability type

Category:

Authentication Bypass

CWE:

CWE-287

Impact:

Local Privilege Escalation to Root via Arbitrary File Overwrite

Severity:

HIGH RISK

(7.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

OpenPrinting CUPS before 2.4.17 allows a local unprivileged user to trick cupsd into authenticating to an attacker-controlled IPP service on localhost using a reusable Authorization: Local ... token.

With this token, the attacker can issue privileged /admin/ requests, create a shared file:///... printer queue despite normal policy restrictions, and ultimately gain an arbitrary root file overwrite that can be leveraged for root command execution.

Affected context

The vulnerability arises in local CUPS deployments where:

  • cupsd is running with administrative capabilities and manages printers on localhost
  • The server is configured to accept Authorization: Local ... authentication for administrative operations
  • Local users can influence or interact with IPP services bound to localhost

In such environments, cupsd may inadvertently reuse a locally scoped authorization token with an attacker-controlled IPP endpoint, effectively extending administrative trust to unprivileged local users who can then manipulate CUPS configuration and queues.

Exploit preconditions

  • Attack surface: Local system; interaction with the CUPS IPP interface on localhost.
  • Required access: An unprivileged local account capable of:
  • Running processes that listen on localhost for IPP traffic, and
  • Interacting with CUPS so that cupsd connects to the attacker-controlled service.
  • Trigger point: cupsd is induced to authenticate to the attacker's localhost IPP service using a reusable Authorization: Local ... token.
  • Why exploitation is possible: The design of the local authorization mechanism and its use across trust boundaries allows a bearer-style token to be:
  • Sent by cupsd to an endpoint it does not fully control or validate, and
  • Reused by the attacker to perform /admin/ operations, including creating shared file:///... queues that bypass the intended FileDevice restrictions.

Why this happens

This weakness maps to CWE-287: Improper Authentication: a local authorization mechanism is applied in a context where the recipient is not reliably authenticated and the token is treated as a reusable bearer credential.

At an abstract level:

  • The system uses a locally scoped "trusted" authorization token to gate administrative endpoints.
  • cupsd is willing to present that token to an IPP peer assumed to be trustworthy based solely on its localhost context.
  • The attacker, by controlling that peer, can capture or otherwise leverage the token to impersonate an authenticated administrative client.
  • Once authenticated, the attacker can invoke administrative IPP operations that normally require elevated privileges, including creating printer queues with backends (file:///...) that should be blocked by policy.

This pattern reflects a flawed trust model and insufficient binding between authorization tokens, their intended peer, and the operations they are allowed to perform.

Potential impact

  • Local unprivileged users could gain effective administrative control over CUPS.
  • Attackers may create persistent file:///... printer queues despite configured policies.
  • Printing to these queues could allow arbitrary root-level file overwrites on the host filesystem.
  • Arbitrary file overwrite could be chained into full root command execution (e.g., via modification of configuration or policy files interpreted by root-level components).
  • Long-term persistence of elevated privileges through modified system or service configuration.

General mitigation guidance

Defensive measures typically focus on tightening authentication semantics and reducing the power of local tokens:

  • Revisit the design of "Local" authorization so that such tokens are:
  • Bound to specific peers or channels, and
  • Not reusable outside their original context or endpoint.
  • Ensure that components like cupsd never send privileged bearer tokens to endpoints whose identity or ownership is not strongly verified, even if they reside on localhost.
  • Apply stricter authorization checks for /admin/ operations, treating them as high-risk regardless of source address, and enforcing explicit authentication flows (e.g., user credential prompts, stronger local mechanisms).
  • Harden printing backend selection:
  • Enforce FileDevice and backend policies in a central, invariant way that cannot be bypassed via administrative APIs.
  • Require elevated, out-of-band authorization for creation of file:/// or other high-risk backends, or disable them entirely in general-purpose environments.
  • Reduce the blast radius of a compromise:
  • Run cupsd with the least privileges necessary and isolate its file access.
  • Restrict where CUPS can write on disk, particularly for spool, configuration, and log paths.
  • In sensitive environments, limit who can interact with CUPS administration APIs on localhost, for example by using OS-level ACLs, containerization, or separate administrative interfaces that do not rely solely on local tokens.

How teams detect issues like this

Security teams can look for this class of issue through:

  • Configuration and code review:
  • Identify uses of locally scoped authentication tokens (Authorization: Local ... or equivalents) and analyze where these tokens can be forwarded or reused.
  • Review IPP admin endpoints to confirm that administrative operations cannot be invoked solely on the basis of source address or loosely scoped local credentials.
  • Examine backend creation logic for any path that allows high-risk backends (file:///, direct filesystem access) to be created via APIs that might be reachable by non-privileged actors.
  • Static or policy-based analysis:
  • Define rules that flag:
  • Reuse of the same authorization token across different trust domains or peers.
  • Any code path that conditions admin access only on localhost checks or similar weak signals.
  • Employ automated configuration scanning to ensure FileDevice and backend restrictions are consistent with intended policy and cannot be overridden programmatically.
  • Runtime monitoring and logging:
  • Enable detailed logging for /admin/ requests, including the source process/user and the type of authentication used.
  • Monitor for the creation of new printer queues, especially those using file:/// or atypical backends.
  • Detect suspicious print jobs that target paths outside standard spool or temporary directories.

Sources

SourceLink
github.comgithub.com/OpenPrinting/cups/security/advisories/GHSA-c54j-2vqw-wpwp

Frequently asked

questions

Exploitation is limited to local users; an attacker must already have a non-privileged account on the system and the ability to run processes that interact with CUPS over localhost. It is not a remote network exploit in typical configurations.

The attacker needs only standard local user privileges. No prior administrative access is required, but they must be able to start a service listening on localhost and interact with the CUPS daemon so that it sends a reusable local authorization token.

The safest pattern is to redesign local authentication so that bearer-style tokens are tightly scoped to a specific, authenticated peer and cannot be forwarded or reused. Administrative endpoints should require robust, explicit authentication and should not depend solely on localhost assumptions or generic local tokens.

Prevention involves enforcing strict trust boundaries even on localhost, avoiding token reuse across those boundaries, and treating any mechanism that grants administrative capabilities as high-risk. Regular security review of authentication flows, centralized enforcement of backend restrictions, and automated checks for filesystem-writing backends accessible to low-privilege users can help avoid repeat issues.

Find out what's already
exploitable in your codebase.