CVE Vulnerabilities

CVE-2024-35235

Improper Link Resolution Before File Access ('Link Following')

Published: Jun 11, 2024 | Modified: Sep 26, 2025
CVSS 3.x
6.7
MEDIUM
Source:
NVD
CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
CVSS 2.x
RedHat/V2
RedHat/V3
4.4 MODERATE
CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N
Ubuntu
MEDIUM
root.io logo minimus.io logo echo.ai logo

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.

Weakness

The product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource.

Affected Software

NameVendorStart VersionEnd Version
CupsOpenprinting*2.4.8 (including)
Red Hat Enterprise Linux 8RedHatcups-1:2.2.6-60.el8_10*
Red Hat Enterprise Linux 8RedHatcups-1:2.2.6-60.el8_10*
Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update SupportRedHatcups-1:2.2.6-45.el8_6.5*
Red Hat Enterprise Linux 8.6 Telecommunications Update ServiceRedHatcups-1:2.2.6-45.el8_6.5*
Red Hat Enterprise Linux 8.6 Update Services for SAP SolutionsRedHatcups-1:2.2.6-45.el8_6.5*
Red Hat Enterprise Linux 8.8 Extended Update SupportRedHatcups-1:2.2.6-51.el8_8.4*
Red Hat Enterprise Linux 9RedHatcups-1:2.3.3op2-27.el9_4*
Red Hat Enterprise Linux 9RedHatcups-1:2.3.3op2-27.el9_4*
Red Hat Enterprise Linux 9.2 Extended Update SupportRedHatcups-1:2.3.3op2-16.el9_2.2*
CupsUbuntudevel*
CupsUbuntuesm-infra/bionic*
CupsUbuntuesm-infra/focal*
CupsUbuntuesm-infra/xenial*
CupsUbuntufocal*
CupsUbuntujammy*
CupsUbuntumantic*
CupsUbuntunoble*
CupsUbuntuupstream*

Potential Mitigations

  • Follow the principle of least privilege when assigning access rights to entities in a software system.
  • Denying access to a file can prevent an attacker from replacing that file with a link to a sensitive file. Ensure good compartmentalization in the system to provide protected areas that can be trusted.

References