Lucene search

K
openvasCopyright (C) 2016 Greenbone AGOPENVAS:1361412562310106155
HistoryJul 27, 2016 - 12:00 a.m.

libupnp Unhandled POST Write Vulnerability

2016-07-2700:00:00
Copyright (C) 2016 Greenbone AG
plugins.openvas.org
61

5 Medium

CVSS2

Attack Vector

NETWORK

Attack Complexity

LOW

Authentication

NONE

Confidentiality Impact

NONE

Integrity Impact

PARTIAL

Availability Impact

NONE

AV:N/AC:L/Au:N/C:N/I:P/A:N

7.5 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

NONE

Integrity Impact

HIGH

Availability Impact

NONE

CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

8.6 High

AI Score

Confidence

High

0.004 Low

EPSS

Percentile

73.9%

libupnp is prone to a unhandled POST write vulnerability

# SPDX-FileCopyrightText: 2016 Greenbone AG
# Some text descriptions might be excerpted from (a) referenced
# source(s), and are Copyright (C) by the respective right holder(s).
#
# SPDX-License-Identifier: GPL-2.0-only

CPE = "cpe:/a:libupnp_project:libupnp";

if(description)
{
  script_oid("1.3.6.1.4.1.25623.1.0.106155");
  script_name("libupnp Unhandled POST Write Vulnerability");
  script_version("2023-07-21T05:05:22+0000");
  script_tag(name:"last_modification", value:"2023-07-21 05:05:22 +0000 (Fri, 21 Jul 2023)");
  script_tag(name:"creation_date", value:"2016-07-27 15:23:00 +0700 (Wed, 27 Jul 2016)");
  script_tag(name:"cvss_base", value:"5.0");
  script_tag(name:"cvss_base_vector", value:"AV:N/AC:L/Au:N/C:N/I:P/A:N");
  script_tag(name:"severity_vector", value:"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N");
  script_tag(name:"severity_origin", value:"NVD");
  script_tag(name:"severity_date", value:"2017-11-03 01:29:00 +0000 (Fri, 03 Nov 2017)");
  script_cve_id("CVE-2016-6255");
  script_category(ACT_ATTACK);
  script_copyright("Copyright (C) 2016 Greenbone AG");
  script_family("Web application abuses");
  script_dependencies("gb_libupnp_consolidation.nasl");
  script_mandatory_keys("libupnp/detected");

  script_xref(name:"URL", value:"http://www.openwall.com/lists/oss-security/2016/07/20/5");
  script_xref(name:"URL", value:"http://pupnp.sourceforge.net/ChangeLog");

  script_tag(name:"summary", value:"libupnp is prone to a unhandled POST write vulnerability");

  script_tag(name:"vuldetect", value:"Tries to write a file und retrieve it again.");

  script_tag(name:"insight", value:"If there's no registered handler for a POST request, the default
  behaviour is to write it to the filesystem. Therefore it is possible to write arbitrary files to it.");

  script_tag(name:"impact", value:"An unauthenticated attacker may write arbitrary files to the filesystem.");

  script_tag(name:"solution", value:"Upgrade to version 1.6.21 or later.");

  script_tag(name:"qod_type", value:"exploit");
  script_tag(name:"solution_type", value:"VendorFix");

  exit(0);
}

include("host_details.inc");
include("http_func.inc");
include("http_keepalive.inc");
include("misc_func.inc");

if( ! port = get_app_port( cpe:CPE, service:"www" ) )
  exit( 0 );

if( ! infos = get_app_location_and_proto( cpe:CPE, port:port ) )
  exit( 0 );

proto = infos["proto"];
vtstrings = get_vt_strings();

file = '/' + vtstrings["lowercase"] + '_cve_2016_6255.test';
data = vtstrings["lowercase_rand"];

req  = http_post_put_req( port:port, url:file, data:data,
                          add_headers:make_array( "Content-Type", "application/x-www-form-urlencoded" ) );
res = http_keepalive_send_recv( port:port, data:req );

if( ! res || res !~ "^HTTP/1\.[01] 200" )
  exit( 0 );

if( http_vuln_check( port:port, url:file, pattern:data, check_header:TRUE ) ) {
  report = http_report_vuln_url( port:port, url:file );
  report += "\n\nPlease delete this uploaded test file.";
  security_message( port:port, data:report, proto:proto );
  exit( 0 );
}

exit( 99 );

5 Medium

CVSS2

Attack Vector

NETWORK

Attack Complexity

LOW

Authentication

NONE

Confidentiality Impact

NONE

Integrity Impact

PARTIAL

Availability Impact

NONE

AV:N/AC:L/Au:N/C:N/I:P/A:N

7.5 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

NONE

Integrity Impact

HIGH

Availability Impact

NONE

CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

8.6 High

AI Score

Confidence

High

0.004 Low

EPSS

Percentile

73.9%