Vulnerability · Published Jun 11, 2024 · Assigned by GitHub_M

CVE-2024-35235Cupsd Listen arbitrary chmod 0140777

Medium 4.4

In plain English

A medium-severity security flaw in cups from OpenPrinting. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 2.4% (higher than 84% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)4.4Medium
Exploit odds (30 days)2.4%top 15.8% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official description

OpenPrinting CUPS is an open source printing system for Linux and other Unix-like operating systems. In versions 2.4.8 and earlier, when starting the cupsd server with a Listen configuration item pointing to a symbolic link, the cupsd process can be caused to perform an arbitrary chmod of the provided argument, providing world-writable access to the target. Given that cupsd is often running as root, this can result in the change of permission of any user or system files to be world writable. Given the aforementioned Ubuntu AppArmor context, on such systems this vulnerability is limited to those files modifiable by the cupsd process. In that specific case it was found to be possible to turn the configuration of the Listen argument into full control over the cupsd.conf and cups-files.conf configuration files. By later setting the User and Group arguments in cups-files.conf, and printing with a printer configured by PPD with a `FoomaticRIPCommandLine` argument, arbitrary user and group (not root) command execution could be achieved, which can further be used on Ubuntu systems to achieve full root command execution. Commit ff1f8a623e090dee8a8aadf12a6a4b25efac143d contains a patch for the issue.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:8cups1:2.2.6-60.el8_10ALSA-2024:4265
AlmaLinux:9cups1:2.3.3op2-27.el9_4ALSA-2024:4776
AlmaLinux:8cups-client1:2.2.6-60.el8_10ALSA-2024:4265
AlmaLinux:9cups-client1:2.3.3op2-27.el9_4ALSA-2024:4776
AlmaLinux:8cups-devel1:2.2.6-60.el8_10ALSA-2024:4265
AlmaLinux:9cups-devel1:2.3.3op2-27.el9_4ALSA-2024:4776
AlmaLinux:8cups-filesystem1:2.2.6-60.el8_10ALSA-2024:4265
AlmaLinux:9cups-filesystem1:2.3.3op2-27.el9_4ALSA-2024:4776
AlmaLinux:8cups-ipptool1:2.2.6-60.el8_10ALSA-2024:4265
AlmaLinux:9cups-ipptool1:2.3.3op2-27.el9_4ALSA-2024:4776
AlmaLinux:8cups-libs1:2.2.6-60.el8_10ALSA-2024:4265
AlmaLinux:9cups-libs1:2.3.3op2-27.el9_4ALSA-2024:4776
AlmaLinux:8cups-lpd1:2.2.6-60.el8_10ALSA-2024:4265
AlmaLinux:9cups-lpd1:2.3.3op2-27.el9_4ALSA-2024:4776
AlmaLinux:9cups-printerapp1:2.3.3op2-27.el9_4ALSA-2024:4776
Alpine:v3.20cups2.4.9-r0ALPINE-CVE-2024-35235
Alpine:v3.21cups2.4.9-r0ALPINE-CVE-2024-35235
Alpine:v3.22cups2.4.9-r0ALPINE-CVE-2024-35235
Alpine:v3.23cups2.4.9-r0ALPINE-CVE-2024-35235
Alpine:v3.24cups2.4.9-r0ALPINE-CVE-2024-35235
Debian:12cups2.4.2-3+deb12u6DEBIAN-CVE-2024-35235
Debian:13cups2.4.7-2DEBIAN-CVE-2024-35235
Debian:14cups2.4.7-2DEBIAN-CVE-2024-35235
Rocky Linux:8cups1:2.2.6-60.el8_10RLSA-2024:4265
Ubuntu:22.04:LTScups2.4.1op1-1ubuntu4.9USN-6844-1
Ubuntu:22.04:LTScups2.4.1op1-1ubuntu4.9UBUNTU-CVE-2024-35235
Ubuntu:24.04:LTScups2.4.7-1.2ubuntu7.1USN-6844-1
Ubuntu:24.04:LTScups2.4.7-1.2ubuntu7.1UBUNTU-CVE-2024-35235

Affected products (as reported)

VendorProductVersions
OpenPrinting cups <= 2.4.8

Weakness: CWE-59, CWE-252 · Vector: CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N

References