Vulnerabilities > CVE-2018-5996 - Improper Restriction of Operations within the Bounds of a Memory Buffer vulnerability in multiple products
Attack vector
LOCAL Attack complexity
LOW Privileges required
NONE Confidentiality impact
HIGH Integrity impact
HIGH Availability impact
HIGH Summary
Insufficient exception handling in the method NCompress::NRar3::CDecoder::Code of 7-Zip before 18.00 and p7zip can lead to multiple memory corruptions within the PPMd code, allows remote attackers to cause a denial of service (segmentation fault) or execute arbitrary code via a crafted RAR archive.
Vulnerable Configurations
Common Weakness Enumeration (CWE)
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 family Windows NASL id 7ZIP_18_00.NASL description The version of 7-Zip installed on the remote Windows host is prior to 18.0. It is, therefore, affected by multiple vulnerabilities. last seen 2020-06-01 modified 2020-06-02 plugin id 109800 published 2018-05-14 reporter This script is Copyright (C) 2018 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/109800 title 7-Zip < 18.00 Multiple Vulnerabilities code # # (C) Tenable Network Security, Inc. # include("compat.inc"); if (description) { script_id(109800); script_version("1.5"); script_cvs_date("Date: 2018/11/15 20:50:26"); script_cve_id("CVE-2017-17969", "CVE-2018-5996"); script_name(english:"7-Zip < 18.00 Multiple Vulnerabilities"); script_summary(english:"Checks the version of 7-Zip."); script_set_attribute(attribute:"synopsis", value: "A compression utility installed on the remote Windows host is affected by multiple vulnerabilities."); script_set_attribute(attribute:"description", value: "The version of 7-Zip installed on the remote Windows host is prior to 18.0. It is, therefore, affected by multiple vulnerabilities."); # https://landave.io/2018/01/7-zip-multiple-memory-corruptions-via-rar-and-zip/ script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?a3028ba9"); # https://blog.0patch.com/2018/02/two-interesting-micropatches-for-7-zip.html script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?20df031b"); # https://www.cisecurity.org/advisory/multiple-vulnerabilities-in-7-zip-could-allow-for-arbitrary-code-execution_2018-009/ script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?42df5e81"); script_set_attribute(attribute:"see_also", value:"https://www.7-zip.org/history.txt"); script_set_attribute(attribute:"solution", value: "Upgrade to 7-Zip version 18.00 or later."); script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P"); script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C"); script_set_cvss3_base_vector("CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"); script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/RC:C"); script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available"); script_set_attribute(attribute:"exploit_available", value:"false"); script_set_attribute(attribute:"vuln_publication_date", value:"2018/01/23"); script_set_attribute(attribute:"patch_publication_date", value:"2018/01/10"); script_set_attribute(attribute:"plugin_publication_date", value:"2018/05/14"); script_set_attribute(attribute:"plugin_type", value:"local"); script_set_attribute(attribute:"cpe", value:"cpe:/a:7-zip:7-zip"); script_end_attributes(); script_category(ACT_GATHER_INFO); script_family(english:"Windows"); script_copyright(english:"This script is Copyright (C) 2018 and is owned by Tenable, Inc. or an Affiliate thereof."); script_dependencies("7zip_installed.nbin"); script_require_keys("installed_sw/7-Zip"); exit(0); } include("audit.inc"); include("global_settings.inc"); include("misc_func.inc"); include("install_func.inc"); app = '7-Zip'; # Pull the installation information from the KB. install = get_single_install(app_name:app, exit_if_unknown_ver:TRUE); path = install['path']; version = install['version']; fix = "18.00"; if (ver_compare(ver:version, fix:fix, strict:FALSE) < 0) { port = get_kb_item("SMB/transport"); if (isnull(port)) port = 445; items = make_array("Installed version", version, "Fixed version", fix, "Path", path ); order = make_list("Path", "Installed version", "Fixed version"); report = report_items_str(report_items:items, ordered_fields:order); security_report_v4(port:port, extra:report, severity:SECURITY_WARNING); exit(0); } else audit(AUDIT_INST_PATH_NOT_VULN, app, version);
NASL family SuSE Local Security Checks NASL id OPENSUSE-2018-188.NASL description This update for p7zip fixes the following security issues : - CVE-2016-1372: Fixed multiple vulnerabilities when processing crafted 7z files (bsc#984650) - CVE-2017-17969: Fixed a heap-based buffer overflow in a shrink decoder (bsc#1077725) - CVE-2018-5996: Fixed memory corruption in RAR decompression. The complete RAR decoder was removed as it also has license issues (bsc#1077724 bsc#1077978) This update was imported from the SUSE:SLE-12:Update update project. last seen 2020-06-05 modified 2018-02-21 plugin id 106920 published 2018-02-21 reporter This script is Copyright (C) 2018-2020 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/106920 title openSUSE Security Update : p7zip (openSUSE-2018-188) NASL family FreeBSD Local Security Checks NASL id FREEBSD_PKG_7A2E00630E4E11E894C05453ED2E2B49.NASL description MITRE reports : Insufficient exception handling in the method NCompress::NRar3::CDecoder::Code of 7-Zip before 18.00 and p7zip can lead to multiple memory corruptions within the PPMd code, alows remote attackers to cause a denial of service (segmentation fault) or execute arbitrary code via a crafted RAR archive. last seen 2020-06-01 modified 2020-06-02 plugin id 106736 published 2018-02-12 reporter This script is Copyright (C) 2018-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/106736 title FreeBSD : p7zip-codec-rar -- insufficient error handling (7a2e0063-0e4e-11e8-94c0-5453ed2e2b49) NASL family SuSE Local Security Checks NASL id SUSE_SU-2018-0464-1.NASL description This update for p7zip fixes the following issues: Security issues fixed : - CVE-2016-1372: Fixed multiple vulnerabilities when processing crafted 7z files (bsc#984650) - CVE-2017-17969: Fixed a heap-based buffer overflow in a shrink decoder (bsc#1077725) - CVE-2018-5996: Fixed memory corruption in RAR decompression. The complete RAR decoder was removed as it also has license issues (bsc#1077724 bsc#1077978) Note that Tenable Network Security has extracted the preceding description block directly from the SUSE security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues. last seen 2020-06-01 modified 2020-06-02 plugin id 106897 published 2018-02-20 reporter This script is Copyright (C) 2018-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/106897 title SUSE SLED12 / SLES12 Security Update : p7zip (SUSE-SU-2018:0464-1)
References
- http://www.securitytracker.com/id/1040831
- http://www.securitytracker.com/id/1040831
- https://0patch.blogspot.si/2018/02/two-interesting-micropatches-for-7-zip.html
- https://0patch.blogspot.si/2018/02/two-interesting-micropatches-for-7-zip.html
- https://landave.io/2018/01/7-zip-multiple-memory-corruptions-via-rar-and-zip/
- https://landave.io/2018/01/7-zip-multiple-memory-corruptions-via-rar-and-zip/