Skip to content

CVE-2025-58364 cups: Remote DoS via null dereference

Moderate
zdohnal published GHSA-7qx3-r744-6qv4 Sep 11, 2025

Package

cups (cups)

Affected versions

<2.4.12

Patched versions

None

Description

Summary

An unsafe deserialization and validation of printer attributes, causes null dereference in libcups library

Details

The combination of:

request = ippNewRequest(IPP_OP_GET_PRINTER_ATTRIBUTES) 
response = cupsDoRequest(http_xyz, request, resource);
ippValidateAttributes(response) 

Is shown in two places in OpenPrinting:

cups/scheduler/ipp.c
libcupsfilters/cupsfilters/ipp.c

Due to a logic error in ipp_read_io() which is called internally by cupsDoRequest(), ippValidateAttributes() has a null dereference.
The null dereference happens in these lines for (ptr = attr->values[i].string.text; *ptr; ptr ++)
This can happen if an attacker responds with a crafted printer attributes response.

PoC

  1. Have two machines on the same network. attacker_machine and target_machine. I used both Ubuntu 24.04.2 LTS
  2. Download and unzip attached zip on the attacker_machine
    poc.zip
  3. On the target_machine, ensure cups and cups-browsed are running.
    On my target_machine I had both:
$ cups-browsed --version
cups-browsed version 2.0.0
$ cups-config --version
2.4.7

And self built instances of versions:

cups-2.4.12
cups-browsed-2.1.1
libcupsfilters-2.1.1
libppd-2.1.1

The bug reproduced on both.
4. On attacker_machine stop cups service
5. On attacker machine install the needed python module specified in requirements.txt
6. On attacker machine run python printer.py {path to response file} {local ip}
7. Ensure that cups-browsed crashed on target_machine.

Another POC:
If you want to reproduce it locally, and to debug it easier, you can use : local_poc.zip
Compile this binary that uses the flow of ipp_read_io() & ippValidateAttributes() to reproduce the bug.

Impact

This is a remote DoS vulnerability available in local subnet in default configurations. It can cause the cups & cups-browsed to crash, on all the machines in local network who are listening for printers (so by default for all regular linux machines).

On systems where the vulnerability CVE-2024-47176 (cups-filters 1.x/cups-browsed 2.x vulnerability) was not fixed, and the firewall on the machine does not reject incoming communication to IPP port, and the machine is set to be available to public internet, attack vector "Network" is possible. The current versions of CUPS and cups-browsed projects have the attack vector "Adjacent" in their default configurations.

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Adjacent
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

CVE ID

CVE-2025-58364

Weaknesses

Improper Input Validation

The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. Learn more on MITRE.

NULL Pointer Dereference

A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. Learn more on MITRE.

Credits