// For flags

CVE-2024-35235

Cupsd Listen arbitrary chmod 0140777

Severity Score

4.4
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

Track*
*SSVC
Descriptions

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.

OpenPrinting CUPS es un sistema de impresión de código abierto para Linux y otros sistemas operativos similares a Unix. En las versiones 2.4.8 y anteriores, al iniciar el servidor cupsd con un elemento de configuración Listen que apunta a un enlace simbólico, se puede hacer que el proceso cupsd realice un chmod arbitrario del argumento proporcionado, proporcionando acceso de escritura mundial al destino. Dado que cupsd a menudo se ejecuta como root, esto puede resultar en el cambio de permiso de cualquier usuario o archivo del sistema para que se pueda escribir en todo el mundo. Dado el contexto de Ubuntu AppArmor antes mencionado, en dichos sistemas esta vulnerabilidad se limita a aquellos archivos modificables por el proceso cupsd. En ese caso específico, se descubrió que era posible convertir la configuración del argumento Listen en control total sobre los archivos de configuración cupsd.conf y cups-files.conf. Al configurar posteriormente los argumentos Usuario y Grupo en cups-files.conf e imprimir con una impresora configurada por PPD con un argumento `FoomaticRIPCommandLine`, se podría lograr la ejecución de comandos arbitrarios de usuarios y grupos (no root), que se pueden usar aún más en Sistemas Ubuntu para lograr la ejecución completa del comando root. El commit ff1f8a623e090dee8a8aadf12a6a4b25efac143d contiene un parche para el problema.

A flaw was found in the cupsd server. When starting the cupsd server with a Listen configuration item pointing to a symbolic link, the cupsd process can perform an arbitrary chmod of the provided argument, providing world-writable access to the target. Since cupsd is often running as root, this issue can result in the change of permission of any user or system files to be world writable.

*Credits: N/A
CVSS Scores
Attack Vector
Local
Attack Complexity
Low
Privileges Required
High
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None
* Common Vulnerability Scoring System
SSVC
  • Decision:Track*
Exploitation
Poc
Automatable
No
Tech. Impact
Partial
* Organization's Worst-case Scenario
Timeline
  • 2024-05-14 CVE Reserved
  • 2024-06-11 CVE Published
  • 2024-06-14 EPSS Updated
  • 2024-11-08 CVE Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
  • CWE-59: Improper Link Resolution Before File Access ('Link Following')
  • CWE-252: Unchecked Return Value
  • CWE-277: Insecure Inherited Permissions
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
OpenPrinting
Search vendor "OpenPrinting"
Cups
Search vendor "OpenPrinting" for product "Cups"
<= 2.4.8
Search vendor "OpenPrinting" for product "Cups" and version " <= 2.4.8"
en
Affected