J-Security Center

Title: Carey Internets Services Commerce.cgi Directory Traversal Vulnerability

Severity: HIGH

Description:

Carey Internet Services Commerce.cgi is a shopping cart application for e-commerce enabled sites.

A remote user could gain read access to known files and directories outside the root directory. Requesting a specially crafted URL composed of '../%00' along with the known filename or directory will disclose the requested resource. This vulnerability could enable an attacker to gain read access to various files residing on the target machine.

This vulnerability involves the use of a "NULL" or "zero" value byte in the filename, an attack common to CGI vulnerabilities. Most C functions that deal with strings regard NULL bytes as string terminators, signifying the end of a string. High-level scripting languages, such as those often used for CGI applications, may not. When passing these filenames to underlying system functions that are written in C, they will often pass a null byte if supplied by a user through. This can cause the string, when intrepreted by the lower level C function, to be cut off prematurely. In situations where files are opened or commands are executed involving user-supplied data, this may pose a security threat.

This is what happens in this vulnerability. User supplied data is used to construct a filename, which is passed to the open() system call by the script interpreter. The open() call interprets the string C style and terminates it at the user-supplied byte. This gives the attacker control over the file that is opened.

Successful exploitation of this vulnerability could lead to the disclosure of sensitive information and possibly assist in further attacks against the victim.

Affected Products:

  • Carey Internet Services Commerce.cgi 2.0.1

References:

Juniper Networks provides this content via a wide variety of sources and production methods. If notified of errors or omissions in the content of this page, Juniper Networks, at its discretion, will modify or remove the page or leave the content as is, depending on various factors including but not limited to the reputation and authority of the party providing the notification. Please use the contact information displayed elsewhere on this page to report any errors or omissions regarding the content on this page.