Lucene search

K
openvasCopyright (C) 2002 [email protected]OPENVAS:11444
HistoryNov 03, 2005 - 12:00 a.m.

PHP Mail Function Header Spoofing Vulnerability

2005-11-0300:00:00
Copyright (C) 2002 [email protected]
plugins.openvas.org
9

0.028 Low

EPSS

Percentile

89.6%

The remote host is running a version of PHP <= 4.2.2.

The mail() function does not properly sanitize user input.
This allows users to forge email to make it look like it is
coming from a different source other than the server.

Users can exploit this even if SAFE_MODE is enabled.

# OpenVAS Vulnerability Test
# $Id: php_mail_func_header_spoof.nasl 6063 2017-05-03 09:03:05Z teissa $
# Description: PHP Mail Function Header Spoofing Vulnerability
#
# Authors:
# [email protected], http://libpcap.net
#
# Copyright:
# Copyright (C) 2002 [email protected]
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2,
# as published by the Free Software Foundation
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#

tag_summary = "The remote host is running a version of PHP <= 4.2.2.

The mail() function does not properly sanitize user input.
This allows users to forge email to make it look like it is
coming from a different source other than the server.

Users can exploit this even if SAFE_MODE is enabled.";

tag_solution = "Contact your vendor for the latest PHP release.";

if(description)
{
  script_id(11444);
  script_version("$Revision: 6063 $");
  script_tag(name:"last_modification", value:"$Date: 2017-05-03 11:03:05 +0200 (Wed, 03 May 2017) $");
  script_tag(name:"creation_date", value:"2005-11-03 14:08:04 +0100 (Thu, 03 Nov 2005)");
  script_bugtraq_id(5562);
  script_tag(name:"cvss_base", value:"7.5");
  script_tag(name:"cvss_base_vector", value:"AV:N/AC:L/Au:N/C:P/I:P/A:P");
  script_cve_id("CVE-2002-0985", "CVE-2002-0986");

  name = "PHP Mail Function Header Spoofing Vulnerability";
  script_name(name);
 
  summary = "Checks for version of PHP";
 
  script_category(ACT_GATHER_INFO);
  script_tag(name:"qod_type", value:"remote_banner");
 
  family = "Web application abuses";
  script_family(family);
  script_copyright("Copyright (C) 2002 [email protected]");
  script_dependencies("gb_get_http_banner.nasl");
  script_mandatory_keys("PHP/banner");
  script_require_ports("Services/www", 80);
  script_tag(name : "solution" , value : tag_solution);
  script_tag(name : "summary" , value : tag_summary);
  exit(0);
}

#
# The script code starts here
#

include("http_func.inc");

port = get_http_port(default:80);


if(get_port_state(port)) {
  banner = get_http_banner(port:port);
  if(!banner)exit(0);

  if(egrep(pattern:".*PHP/([0-3]\..*|4\.[0-1]\..*|4\.2\.[0-2][^0-9])", string:banner)) {
    security_message(port);
  }
}
 

0.028 Low

EPSS

Percentile

89.6%