CVE-2017-5899

HIGH

s-nail < 14.8.5 - Path Traversal via randstr Argument

Title source: llm
STIX 2.1

Exploitation Summary

EIP tracks 1 public exploit for CVE-2017-5899. PoCs published by bcoles.

AI-analyzed exploit summary This exploit leverages a directory traversal vulnerability in s-nail's privsep helper (CVE-2017-5899) to achieve local privilege escalation via a race condition and ld.so.preload manipulation. It compiles a shared library to escalate privileges and spawns a root shell.

Description

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

Exploits (1)

exploitdb WORKING POC
by bcoles · bashlocalmultiple
https://www.exploit-db.com/exploits/47172

This exploit leverages a directory traversal vulnerability in s-nail's privsep helper (CVE-2017-5899) to achieve local privilege escalation via a race condition and ld.so.preload manipulation. It compiles a shared library to escalate privileges and spawns a root shell.

Classification
Working Poc 95%
Attack Type
Lpe
Complexity
Complex
Reliability
Racy
Target: s-nail (versions with vulnerable s-nail-privsep)
No auth needed
Prerequisites: Local access to a vulnerable system · Write access to /var/tmp · Presence of s-nail-privsep binary
devstral-2 · analyzed Feb 16, 2026 Full analysis →

References (4)

Core 4
Core References
Mailing List, Third Party Advisory mailing-list x_refsource_mlist
http://www.openwall.com/lists/oss-security/2017/02/07/4
Exploit, Mailing List, Third Party Advisory mailing-list x_refsource_mlist
http://www.openwall.com/lists/oss-security/2017/01/27/7
Third Party Advisory, VDB Entry vdb-entry x_refsource_bid
http://www.securityfocus.com/bid/96138

Scores

CVSS v3 7.0
EPSS 0.0101
EPSS Percentile 58.7%
Attack Vector LOCAL
CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

Details

CWE
CWE-22 CWE-362
Status published
Products (1)
s-nail_project/s-nail < 14.8.5
Published Mar 27, 2017
Tracked Since Feb 18, 2026