Vulnerabilities > CVE-2018-13381 - Improper Restriction of Operations within the Bounds of a Memory Buffer vulnerability in Fortinet Fortios and Fortiproxy

047910
CVSS 5.0 - MEDIUM
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
NONE
Integrity impact
NONE
Availability impact
PARTIAL
network
low complexity
fortinet
CWE-119
nessus

Summary

A buffer overflow vulnerability in Fortinet FortiOS 6.0.0 through 6.0.4, 5.6.0 through 5.6.7, 5.4 and earlier versions and FortiProxy 2.0.0, 1.2.8 and earlier versions under SSL VPN web portal allows a non-authenticated attacker to perform a Denial-of-service attack via special craft message payloads.

Vulnerable Configurations

Part Description Count
Application
Fortinet
25
OS
Fortinet
157

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Buffer Overflow via Environment Variables
    This attack pattern involves causing a buffer overflow through manipulation of environment variables. Once the attacker finds that they can modify an environment variable, they may try to overflow associated buffers. This attack leverages implicit trust often placed in environment variables.
  • Overflow Buffers
    Buffer Overflow attacks target improper or missing bounds checking on buffer operations, typically triggered by input injected by an attacker. As a consequence, an attacker is able to write past the boundaries of allocated buffer regions in memory, causing a program crash or potentially redirection of execution as per the attackers' choice.
  • Client-side Injection-induced Buffer Overflow
    This type of attack exploits a buffer overflow vulnerability in targeted client software through injection of malicious content from a custom-built hostile service.
  • Filter Failure through Buffer Overflow
    In this attack, the idea is to cause an active filter to fail by causing an oversized transaction. An attacker may try to feed overly long input strings to the program in an attempt to overwhelm the filter (by causing a buffer overflow) and hoping that the filter does not fail securely (i.e. the user input is let into the system unfiltered).
  • MIME Conversion
    An attacker exploits a weakness in the MIME conversion routine to cause a buffer overflow and gain control over the mail server machine. The MIME system is designed to allow various different information formats to be interpreted and sent via e-mail. Attack points exist when data are converted to MIME compatible format and back.

Nessus

  • NASL familyMacOS X Local Security Checks
    NASL idMACOSX_FORTIOS_FG-IR-18-387.NASL
    descriptionThe remote Mac OS X host is running a version of FortiOS prior or equal to 5.4, 5.6.x prior to 5.6.8 or 6.0.x prior to 6.0.5. It is, therefore, affected by a buffer overflow condition in the SSL-VPN web portal, due to a failure to properly parse message payloads. An unauthenticated attacker can exploit this, via a specially crafted request to cause a denial of service condition.
    last seen2020-06-01
    modified2020-06-02
    plugin id125892
    published2019-06-14
    reporterThis script is Copyright (C) 2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/125892
    titleFortinet FortiOS (Mac OS X) <= 5.4, 5.6.x < 5.6.8, 6.0.x < 6.0.5 SSL VPN Buffer Overflow (FG-IR-18-387)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(125892);
      script_version("1.6");
      script_cvs_date("Date: 2019/11/21");
    
      script_cve_id("CVE-2018-13381");
      script_bugtraq_id(104890);
    
      script_name(english:"Fortinet FortiOS (Mac OS X) <= 5.4, 5.6.x < 5.6.8, 6.0.x < 6.0.5 SSL VPN Buffer Overflow (FG-IR-18-387)");
      script_summary(english:"Checks the version of FortiOS.");
    
      script_set_attribute(attribute:"synopsis", value:
    "The remote Mac OS X host is affected by a buffer overflow condition.");
      script_set_attribute(attribute:"description", value:
    "The remote Mac OS X host is running a version of FortiOS prior or equal to 5.4, 5.6.x prior to 5.6.8 or 6.0.x prior to
    6.0.5. It is, therefore, affected by a buffer overflow condition in the SSL-VPN web portal, due to a failure to properly
    parse message payloads. An unauthenticated attacker can exploit this, via a specially crafted request to cause a denial 
    of service condition.");
      # https://fortiguard.com/psirt/FG-IR-18-387
      script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?ffaddea9");
      script_set_attribute(attribute:"solution", value:
    "Upgrade to Fortinet FortiOS version to 5.6.8, 6.0.5, 6.2.0 or later. Alternatively, apply one of the workarounds 
    outlined in the linked advisory");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:N/I:N/A:P");
      script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/RC:C");
      script_set_attribute(attribute:"cvss_score_source", value:"CVE-2018-13381");
    
      script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2019/05/17");
      script_set_attribute(attribute:"patch_publication_date", value:"2019/05/17");
      script_set_attribute(attribute:"plugin_publication_date", value:"2019/06/14");
    
      script_set_attribute(attribute:"potential_vulnerability", value:"true");
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:fortinet:fortios");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"MacOS X Local Security Checks");
    
      script_copyright(english:"This script is Copyright (C) 2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
    
      script_dependencies("macos_forticlient_detect.nbin");
      script_require_keys("installed_sw/FortiClient (macOS)", "Host/MacOSX/Version", "Settings/ParanoidReport");
    
      exit(0);
    }
    
    include('audit.inc');
    include('vcf.inc');
    
    if (!get_kb_item('Host/MacOSX/Version')) audit(AUDIT_OS_NOT, 'Mac OS X');
    get_kb_item_or_exit('installed_sw/FortiClient (macOS)');
    app_info = vcf::get_app_info(app:'FortiClient (macOS)');
    
    # there is a workaround
    if (report_paranoia < 2) audit(AUDIT_PARANOID);
    
    constraints = [
      { 'max_version':'5.4', 'fixed_display':'5.6.8, 6.0.5, 6.2.0 or later' },
      { 'min_version':'5.6.0', 'fixed_version':'5.6.8'},
      { 'min_version':'6.0.0', 'fixed_version':'6.0.5'}
    ];
    
    vcf::check_version_and_report(app_info:app_info, constraints:constraints, severity:SECURITY_WARNING);
    
  • NASL familyFirewalls
    NASL idFORTIOS_FG-IR-18-387.NASL
    descriptionThe remote host is running a version of FortiOS prior or equal to 5.4, 5.6.x prior to 5.6.8 or 6.0.x prior to 6.0.5. It is, therefore, affected by a buffer overflow condition in the SSL-VPN web portal, due to a failure to properly parse message payloads. An unauthenticated attacker can exploit this, via a specially crafted request to cause a denial of service condition.
    last seen2020-06-01
    modified2020-06-02
    plugin id125886
    published2019-06-14
    reporterThis script is Copyright (C) 2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/125886
    titleFortinet FortiOS <= 5.4, 5.6.x < 5.6.8, 6.0.x < 6.0.5 SSL VPN Buffer Overflow (FG-IR-18-387)