CVE-2018-1000097 in sharutilsinfo

Summary

by MITRE

Sharutils sharutils (unshar command) version 4.15.2 contains a Buffer Overflow vulnerability in Affected component on the file unshar.c at line 75, function looks_like_c_code. Failure to perform checking of the buffer containing input line. that can result in Could lead to code execution. This attack appear to be exploitable via Victim have to run unshar command on a specially crafted file..

If you want to get best quality of vulnerability data, you may have to visit VulDB.

Analysis

by VulDB Data Team • 02/21/2023

The CVE-2018-1000097 vulnerability represents a critical buffer overflow flaw within the sharutils package, specifically affecting the unshar command utility version 4.15.2. This vulnerability resides in the unshar.c source file at line 75 within the looks_like_c_code function, where inadequate input validation leads to potential arbitrary code execution. The flaw occurs when the utility processes specially crafted input files, making it particularly dangerous in environments where users might unknowingly execute unshar on malicious content. The vulnerability stems from insufficient bounds checking on buffer operations that handle input lines, creating an exploitable condition where attacker-controlled data can overwrite adjacent memory locations.

The technical nature of this vulnerability aligns with CWE-121, which describes heap-based buffer overflow conditions, and more specifically with CWE-787, representing out-of-bounds write vulnerabilities. The attack vector requires user interaction through execution of the unshar command on maliciously crafted files, making it a classic example of a user-initiated code execution vulnerability. The operational impact extends beyond simple privilege escalation as the flaw can be exploited across different privilege levels depending on how the vulnerable system is configured. The vulnerability demonstrates characteristics consistent with ATT&CK technique T1203, where adversaries leverage system utilities to execute malicious code through crafted input processing.

The exploitation of this vulnerability requires an attacker to create a specially formatted file that, when processed by the unshar command, triggers the buffer overflow condition. This typically involves crafting input that exceeds the allocated buffer size, causing memory corruption that can be leveraged to redirect program execution flow. The vulnerability affects systems where sharutils is installed and where users might process untrusted files through the unshar utility, particularly in environments with shared computing resources or automated file processing systems. Security implications extend to potential privilege escalation scenarios where the unshar command might be executed with elevated privileges, amplifying the impact of successful exploitation. Organizations should implement immediate mitigations including disabling or restricting execution of the unshar utility, updating to patched versions of sharutils, and implementing proper input validation controls to prevent similar vulnerabilities in other software components.

Reservation

03/12/2018

Disclosure

03/12/2018

Moderation

accepted

CPE

ready

EPSS

0.03603

KEV

no

Activities

very low

Sources

Do you want to use VulDB in your project?

Use the official API to access entries easily!