CVE-2018-1000097
High · 7.8CVSS
7.8
EPSS
2.0%
Published
Mar 13, 2018
CISA due date
—
Cloudanix analysis
A file unpacking tool can let attackers run their own code on a computer if someone opens a specially made file with it.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Full Compromise
- Component
- Application
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Buffer overflow in the looks_like_c_code function in unshar.c at line 75 due to absent bounds checking on input lines, enabling arbitrary code execution.
Why it matters to the business
Attackers can gain code execution on Linux systems if users process untrusted shar archives, increasing risk of compromise across Ubuntu, Debian, and other distributions using sharutils.
How an attack unfolds
An attacker crafts a shar file that triggers the unchecked buffer in looks_like_c_code when a victim runs unshar on it, leading to code execution.
How to fix it
Upgrade sharutils to a patched release from the distribution vendor or disable/uninstall the unshar command; avoid processing untrusted shar archives.
How to confirm the fix worked
Confirm sharutils package version is updated beyond the vulnerable 4.15.2 release and test unshar against known trigger inputs to verify absence of overflow behavior.
Typical attack path
- Craft malicious shar file to overflow buffer in unshar.c
- Deliver file to target via email, web, or shared storage
- Victim executes unshar on the crafted file
- Overflow leads to arbitrary code execution
How to detect it
Review process execution logs and command history for unshar invocations on files from external or untrusted sources; correlate with subsequent anomalous process creation or privilege escalation.
- unshar
- looks_like_c_code
- /usr/bin/unshar
What your security team should do
- Restrict or remove sharutils from systems where possible
- Apply vendor patches for sharutils immediately
- Block execution of unshar on files from untrusted origins via policy or sandboxing
The record
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..
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | sharutils | 0 | 1:4.15.2-3 |
| Debian:12 | sharutils | 0 | 1:4.15.2-3 |
| Debian:13 | sharutils | 0 | 1:4.15.2-3 |
| Debian:8 | sharutils | 0 | 1:4.14-2+deb8u1 |
| Debian:9 | sharutils | 0 | 1:4.15.2-2+deb9u1 |
| Ubuntu:14.04:LTS | sharutils | 0 | 1:4.14-1ubuntu1.1 |
| Ubuntu:16.04:LTS | sharutils | 0 | 1:4.15.2-1ubuntu0.1 |
| openSUSE:Tumbleweed | sharutils | 0 | 4.15.2-6.9 |
Related vulnerabilities
- CVE-2026-112108 A vulnerability was determined in ztxz16 fastllm up to 0.1.8.2. CWE-119
- CVE-2026-112073 A vulnerability was identified in Tencent ncnn up to 44b02dabdcf97499281a4692ebd65bad73dc… CWE-119
- CVE-2026-90831 A vulnerability was detected in GNU Binutils 2.47. CWE-119
- CVE-2026-90804 A vulnerability was detected in GNU Binutils 2.47. CWE-119
- CVE-2026-90803 A security vulnerability has been detected in GNU Binutils 2.47. CWE-119
- CVE-2026-90801 A security flaw has been discovered in GNU Binutils 2.47. CWE-119
- CVE-2026-87933 A vulnerability was found in DaveGamble cJSON up to 1.7.19. CWE-119
- CVE-2026-87931 A vulnerability has been found in Behavioral Technology Group Pavlok Behavioral… CWE-119