Spring Framework 4.3.x < 4.3.15 / 5.0.x < 5.0.5 Windows Directory Traversal Vulnerability (CVE-2018-1271) - Nessus

Medium   Plugin ID: 119846

This page contains detailed information about the Spring Framework 4.3.x < 4.3.15 / 5.0.x < 5.0.5 Windows Directory Traversal Vulnerability (CVE-2018-1271) Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 119846
Name: Spring Framework 4.3.x < 4.3.15 / 5.0.x < 5.0.5 Windows Directory Traversal Vulnerability (CVE-2018-1271)
Filename: spring_CVE-2018-1271.nasl
Vulnerability Published: 2018-04-05
This Plugin Published: 2018-12-21
Last Modification Time: 2022-04-11
Plugin Version: 1.4
Plugin Type: local
Plugin Family: Windows
Dependencies: jar_detect_win.nbin, os_fingerprint.nasl
Required KB Items [?]: installed_sw/Pivotal Software Spring Framework, Settings/ParanoidReport

Vulnerability Information


Severity: Medium
Vulnerability Published: 2018-04-05
Patch Published: 2018-04-05
CVE [?]: CVE-2018-1271
CPE [?]: cpe:/a:pivotal_software:spring_framework

Synopsis

The remote Windows host contains a web application framework library that is affected by a directory traversal vulnerability.

Description

The remote Windows host contains a Spring Framework library version that is 4.3.x prior to 4.3.15 or 5.0.x prior to 5.0.5. It is, therefore, affected by a directory traversal vulnerability. An unauthenticated, remote attacker can exploit this, by sending a URI that contains directory traversal characters, to disclose the contents of files located outside of the server's restricted path.

Note that Nessus has not tested for this issue but has instead relied only on the application's self-reported version number.

Solution

Upgrade to Spring Framework version 4.3.15 or 5.0.5 or later.

Public Exploits


Target Network Port(s): N/A
Target Asset(s): N/A
Exploit Available: True (GitHub, D2 Elliot)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the Spring Framework 4.3.x < 4.3.15 / 5.0.x < 5.0.5 Windows Directory Traversal Vulnerability (CVE-2018-1271) vulnerability:

  1. GitHub: https://github.com/ilmari666/cybsec
    [CVE-2018-1271]
  2. D2 Elliot: spring_mvc_file_disclosure.html
    [Spring MVC File Disclosure]

Before running any exploit against any system, make sure you are authorized by the owner of the target system(s) to perform such activity. In any other case, this would be considered as an illegal activity.

WARNING: Beware of using unverified exploits from sources such as GitHub or Exploit-DB. These exploits and PoCs could contain malware. For more information, see how to use exploits safely.

Risk Information


CVSS Score Source [?]: CVE-2018-1271
CVSS V2 Vector: AV:N/AC:M/Au:N/C:P/I:N/A:N/E:F/RL:OF/RC:C
CVSS Base Score:4.3 (Medium)
Impact Subscore:2.9
Exploitability Subscore:8.6
CVSS Temporal Score:3.6 (Low)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:3.6 (Low)
CVSS V3 Vector: CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N/E:F/RL:O/RC:C
CVSS Base Score:5.9 (Medium)
Impact Subscore:3.6
Exploitability Subscore:2.2
CVSS Temporal Score:5.5 (Medium)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:5.5 (Medium)

Go back to menu.

Plugin Source


This is the spring_CVE-2018-1271.nasl nessus plugin source code. This script is Copyright (C) 2018-2022 and is owned by Tenable, Inc. or an Affiliate thereof.

#%NASL_MIN_LEVEL 70300
#
# (C) Tenable Network Security, Inc.
#

include('deprecated_nasl_level.inc');
include('compat.inc');

if (description)
{
  script_id(119846);
  script_version("1.4");
  script_set_attribute(attribute:"plugin_modification_date", value:"2022/04/11");

  script_cve_id("CVE-2018-1271");

  script_name(english:"Spring Framework 4.3.x < 4.3.15 / 5.0.x < 5.0.5 Windows Directory Traversal Vulnerability (CVE-2018-1271)");

  script_set_attribute(attribute:"synopsis", value:
"The remote Windows host contains a web application framework library that is
affected by a directory traversal vulnerability.");
  script_set_attribute(attribute:"description", value:
"The remote Windows host contains a Spring Framework library version
that is 4.3.x prior to 4.3.15 or 5.0.x prior to 5.0.5. It is,
therefore, affected by a directory traversal vulnerability. An
unauthenticated, remote attacker can exploit this, by sending a URI
that contains directory traversal characters, to disclose the
contents of files located outside of the server's restricted path.

Note that Nessus has not tested for this issue but has instead relied
only on the application's self-reported version number.");
  script_set_attribute(attribute:"see_also", value:"https://pivotal.io/security/cve-2018-1271");
  script_set_attribute(attribute:"solution", value:
"Upgrade to Spring Framework version 4.3.15 or 5.0.5 or later.");
  script_set_attribute(attribute:"agent", value:"windows");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:N/A:N");
  script_set_cvss_temporal_vector("CVSS2#E:F/RL:OF/RC:C");
  script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N");
  script_set_cvss3_temporal_vector("CVSS:3.0/E:F/RL:O/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2018-1271");

  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"d2_elliot_name", value:"Spring MVC File Disclosure");
  script_set_attribute(attribute:"exploit_framework_d2_elliot", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2018/04/05");
  script_set_attribute(attribute:"patch_publication_date", value:"2018/04/05");
  script_set_attribute(attribute:"plugin_publication_date", value:"2018/12/21");

  script_set_attribute(attribute:"potential_vulnerability", value:"true");
  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:pivotal_software:spring_framework");
  script_set_attribute(attribute:"thorough_tests", value:"true");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"Windows");

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

  script_dependencies("os_fingerprint.nasl", "jar_detect_win.nbin");
  script_require_keys("installed_sw/Pivotal Software Spring Framework", "Settings/ParanoidReport");

  exit(0);
}

include("vcf.inc");

if (report_paranoia < 2) audit(AUDIT_PARANOID);

app = "Pivotal Software Spring Framework";
get_install_count(app_name:app, exit_if_zero:TRUE);

# only Windows is affected
os = get_kb_item_or_exit("Host/OS");
if ('windows' >!< tolower(os))
  audit(AUDIT_OS_NOT, "Windows");

app_info = vcf::get_app_info(app:app, win_local:TRUE);

constraints = [
  { "min_version":"4.3", "fixed_version":"4.3.15" },
  { "min_version":"5.0", "fixed_version":"5.0.5" }
];

vcf::check_version_and_report(app_info:app_info, constraints:constraints, severity:SECURITY_WARNING);

The latest version of this script can be found in these locations depending on your platform:

  • Linux / Unix:
    /opt/nessus/lib/nessus/plugins/spring_CVE-2018-1271.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\spring_CVE-2018-1271.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/spring_CVE-2018-1271.nasl

Go back to menu.

How to Run


Here is how to run the Spring Framework 4.3.x < 4.3.15 / 5.0.x < 5.0.5 Windows Directory Traversal Vulnerability (CVE-2018-1271) as a standalone plugin via the Nessus web user interface (https://localhost:8834/):

  1. Click to start a New Scan.
  2. Select Advanced Scan.
  3. Navigate to the Plugins tab.
  4. On the top right corner click to Disable All plugins.
  5. On the left side table select Windows plugin family.
  6. On the right side table select Spring Framework 4.3.x < 4.3.15 / 5.0.x < 5.0.5 Windows Directory Traversal Vulnerability (CVE-2018-1271) plugin ID 119846.
  7. Specify the target on the Settings tab and click to Save the scan.
  8. Run the scan.

Here are a few examples of how to run the plugin in the command line. Note that the examples below demonstrate the usage on the Linux / Unix platform.

Basic usage:

/opt/nessus/bin/nasl spring_CVE-2018-1271.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a spring_CVE-2018-1271.nasl -t <IP/HOST>

Run the plugin with trace script execution written to the console (useful for debugging):

/opt/nessus/bin/nasl -T - spring_CVE-2018-1271.nasl -t <IP/HOST>

Run the plugin with using a state file for the target and updating it (useful for running multiple plugins on the target):

/opt/nessus/bin/nasl -K /tmp/state spring_CVE-2018-1271.nasl -t <IP/HOST>

Go back to menu.

References


See also: Similar and related Nessus plugins:
  • 159375 - Spring Cloud Function SPEL Expression Injection (direct check)
  • 129500 - Spring Framework 4.3.x < 4.3.16 / 5.0.x < 5.0.5 Remote Code Execution with spring-messaging (CVE-2018-1270)
  • 133148 - Spring Framework 5.0.x < 5.0.16 / 5.1.x < 5.1.13 / 5.2.x < 5.2.3 Spring Framework Reflected File Download Vulnerability. (CVE-2020-5398)
  • 159730 - VMware Spring Cloud Function < 3.1.7 / 3.2.x < 3.2.3 SPEL Expression Injection (local check)
  • 159374 - Spring Framework < 5.2.20 / 5.3.x < 5.3.18 Remote Code Execution (CVE-2022-22965)
  • 160544 - Spring Data Commons < 1.13.11 / 2.x < 2.0.6 RCE
  • 159542 - Spring Framework Spring4Shell (CVE-2022-22965)
  • 126653 - Debian DLA-1853-1 : libspring-java security update
  • 149004 - Debian DLA-2635-1 : libspring-java security update
  • 73255 - Debian DSA-2890-1 : libspring-java - security update
  • 129973 - Oracle GoldenGate for Big Data 12.3.1.1.x < 12.3.1.1.6 / 12.3.2.1.x < 12.3.2.1.5 Spring Framework DoS (Oct 2019 CPU)
  • 125101 - EulerOS Virtualization for ARM 64 3.0.1.0 : kernel (EulerOS-SA-2019-1513)

Version


This page has been produced using Nessus Professional 10.1.2 (#68) LINUX, Plugin set 202205072148.
Plugin file spring_CVE-2018-1271.nasl version 1.4. For more plugins, visit the Nessus Plugin Library.

Go back to menu.