6.9
CVSSv2

CVE-2017-5899

Published: 27/03/2017 Updated: 07/11/2023
CVSS v2 Base Score: 6.9 | Impact Score: 10 | Exploitability Score: 3.4
CVSS v3 Base Score: 7 | Impact Score: 5.9 | Exploitability Score: 1
VMScore: 695
Vector: AV:L/AC:M/Au:N/C:C/I:C/A:C

Vulnerability Summary

Directory traversal vulnerability in the setuid root helper binary in S-nail (later S-mailx) prior to 14.8.16 allows local users to write to arbitrary files and consequently gain root privileges via a .. (dot dot) in the randstr argument.

Vulnerable Product Search on Vulmon Subscribe to Product

s-nail project s-nail

Vendor Advisories

Directory traversal vulnerability in the setuid root helper binary in S-nail (later S-mailx) before 14816 allows local users to write to arbitrary files and consequently gain root privileges via a (dot dot) in the randstr argument ...

Exploits

#!/bin/sh # Wrapper for @wapiflapi's s-nail-privgetc local root exploit for CVE-2017-5899 # uses ldsopreload technique # --- # [~] Found privsep: /usr/lib/s-nail/s-nail-privsep # [] Compiling /var/tmp/snailsoc # [] Compiling /var/tmp/shc # [] Compiling /var/tmp/privgetc # [] Adding /var/tmp/snailso to /etc/ldsopreload ...