// back

Hewlett-Packard Multiple Printers PostScript Interpreter Directory Traversal Vulnerability

26.04.13

BACKGROUND

HP Printers are common home and business printers. More information can be found at the vendor's website:

http://welcome.hp.com/country/us/en/prodserv/printing_multifunction.html

DESCRIPTION

Remote exploitation of a directory traversal vulnerability in Hewlett-Packard Development Co. LP (HP)'s PostScript Interpreter, as included with multiple printers and MFPs, could allow an attacker to execute arbitrary code with the privileges of the affected service.

HP Printers contain support for multiple scripting languages embedded within printed documents, including PostScript. The vulnerability occurs in the PostScript Interpreter, and allows an attacker with access to printing services to access and modify arbitrary files on the file system. When opening files, the PostScript Interpreter does not check for embedded directory traversal sequences (such as "../"). This allows a malicious print job to open, read and write to arbitrary files on the system outside of the print job "sandbox" area. Additionally, the interpreter runs with root privileges. An attacker can use this to execute arbitrary code by overwriting system libraries, or adding users to the password file.

ANALYSIS

Exploitation of this vulnerability results in the execution of arbitrary code with the privileges of the affected service, usually root. To exploit this vulnerability, an attacker requires the ability to connect to the target printer over TCP port 9100, the JetDirect port. Since port 9100 would typically be firewalled at the network perimeter, the likely attack vector is from an attacker already behind the firewall. Additionally, a remote attacker could convince a user to print a malicious document on their behalf, which would remove the need for direct access.

DETECTION

HP has confirmed the following printers to be vulnerable:

  • HP Color LaserJet 3000: Model Q7534A
  • HP Color LaserJet 3800: Model Q5981A
  • HP Color LaserJet 4700: Model Q7492A
  • HP Color LaserJet 4730 Multifunction Printer: Model CB480A
  • HP Color LaserJet 4730 Multifunction Printer: Model CB480A
  • HP Color LaserJet 5550: Model Q3714A
  • HP Color LaserJet 9500 Multifunction Printer: Model C8549A
  • HP Color LaserJet CM6030 Multifunction Printer: Model CE664A
  • HP Color LaserJet CM6040 Multifunction Printer: Model Q3939A
  • HP Color LaserJet CP3505: Model CB442A
  • HP Color LaserJet CP3525: Model CC469A
  • HP Color LaserJet CP4005: Model CB503A
  • HP Color LaserJet CP6015: Model Q3932A
  • HP Color LaserJet Enterprise CP4025: Model CC490A
  • HP Color LaserJet Enterprise CP4525: Model CC493A
  • HP LaserJet 4240: Model Q7785A
  • HP LaserJet 4250: Model Q5400A
  • HP LaserJet 4345 Multifunction Printer: Model Q3942A
  • HP LaserJet 4350: Model Q5407A
  • HP LaserJet 5200L: Model Q7543A
  • HP LaserJet 5200N: Model Q7543A
  • HP LaserJet 9040: Model Q7697A
  • HP LaserJet 9040 Multifunction Printer: Model Q3721A
  • HP LaserJet 9050: Model Q7697A
  • HP LaserJet 9050 Multifunction Printer: Model Q3721A
  • HP LaserJet Enterprise P3015 CE526A
  • HP LaserJet M3027 Multifunction Printer: Model CB416A
  • HP LaserJet M3035 Multifunction Printer: Model CB414A
  • HP LaserJet M3035 Multifunction Printer: Model CC519A
  • HP LaserJet M4345 Multifunction Printer: Model CB425A
  • HP LaserJet M5025 Multifunction Printer: Model Q7840A
  • HP LaserJet M5035 Multifunction Printer: Model Q7829A
  • HP LaserJet M9040 Multifunction Printer: Model CC394A
  • HP LaserJet M9050 Multifunction Printer: Model CC395A
  • HP LaserJet P3005: Model Q7812A
  • HP LaserJet P4014: Model CB507A
  • HP LaserJet P4015: Model CB509A
  • HP LaserJet P4515: Model CB514A
  • HP 9250c Digital Sender: Model CB472A

WORKAROUND

It is possible to disable file system access for the PostScript interpreter in the device settings.

VENDOR RESPONSE

HP has released a fix which addresses this issue. For more information, consult their advisory at the following URL:

http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=c03744742

CVE INFORMATION

The Common Vulnerabilities and Exposures (CVE) project has assigned the name CVE-2012-5221 to this issue. This is a candidate for inclusion in the CVE list (http://cve.mitre.org/), which standardizes names for security problems.

DISCLOSURE TIMELINE

08/29/2012 Initial Vendor Notification
08/30/2012 Initial Vendor Reply
04/26/2013 Coordinated Public Disclosure

CREDIT

This vulnerability was reported to iDefense by Andrei Costin.

Get paid for vulnerability research
http://labs.idefense.com/methodology/vulnerability/vcp.php

Free tools, research and upcoming events
http://labs.idefense.com/

LEGAL NOTICES

Copyright © 2013 Verisign, Inc.

Permission is granted for the redistribution of this alert electronically. It may not be edited in any way without the express written consent of iDefense Verisign. If you wish to reprint the whole or any part of this alert in any other medium other than electronically, please e-mail customer service for permission.

Disclaimer: The information in the advisory is believed to be accurate at the time of publishing based on currently available information. Use of the information constitutes acceptance for use in an AS IS condition. There are no warranties with regard to this information. Neither the author nor the publisher accepts any liability for any direct, indirect, or consequential loss or damage arising from use of, or reliance on, this information.