Security Experts:

Serious Vulnerabilities Patched in CUPS Printing Service

CUPS has been updated to address a couple of security bugs that can be exploited by a malicious actor to elevate privileges and execute arbitrary code on affected systems.

CUPS (Common Unix Printing System) is a popular open source printing system developed by Apple for UNIX-like operating systems. CUPS uses the Internet Printing Protocol (IPP) for printing to local and network printers.

According to an advisory published by Michael Sweet, the original author of CUPS, the security bugs were reported by Google.

The first issue is a privilege escalation flaw related to how cupsd, the scheduler for CUPS, handles certain requests (CVE-2015-1158).

“An issue with how localized strings are handled in cupsd allows a reference counter to over-decrement when handling certain print job request errors. As a result, an attacker can prematurely free an arbitrary string of global scope, creating a dangling pointer to a repurposed block of memory on the heap,” the CERT Coordination Center (CERT/CC) at Carnegie Mellon University wrote in an advisory published on Tuesday.

“The dangling pointer causes ACL verification to fail when parsing 'admin/conf' and 'admin' ACLs. The ACL handling failure results in unrestricted access to privileged operations, allowing an unauthenticated remote user to upload a replacement CUPS configuration file and mount further attacks,” said CERT/CC.

This vulnerability, which can be exploited by anyone with the ability to send print job requests, has existed since the release of version 1.2.0 in 2006.

The second security hole is a cross-site scripting (XSS) bug in the CUPS template engine. The XSS (CVE-2015-1159) allows an attacker to exploit CVE-2015-1158 when a user browses the web, said CERT/CC.

“In certain cases, the CGI template can echo user input to file rather than escaping the text first. This may be used to set up a reflected XSS attack in the QUERY parameter of the web interface help page. By default, many linux distributions run with the web interface activated; OS X has the web interface deactivated by default,” CERT/CC explained.

CUPS developers have patched the vulnerabilities with the release of version 2.0.3, which also includes fixes for a denial-of-service (DoS) flaw that can be exploited via malformed gzip files, and several general bugs. The developers of various Linux distributions are also preparing patches.

view counter
Eduard Kovacs (@EduardKovacs) is a contributing editor at SecurityWeek. He worked as a high school IT teacher for two years before starting a career in journalism as Softpedia’s security news reporter. Eduard holds a bachelor’s degree in industrial informatics and a master’s degree in computer techniques applied in electrical engineering.