CVE DatabaseCVE-2017-7494
한국어 권고문 →
CVE-2017-74949.8/CRITICALCISA KEVCWE-94CWE-94

Samba Remote Code Execution (RCE) Vulnerability (CVE-2017-7494, SambaCry) Analysis and Mitigation Guide

⚡ Jump to Patch
Affected Vendors
samba
Affected Components
samba
Published Date
2017-05-30
CVSS v3.1
9.8
CRITICAL
EPSS (30d)
99.5%
FIRST.org
CISA KEV
Exploited

Executive & SecOps Summary

SECOPS ASSESSMENT
Affected Scope

Samba versions from 3.5.0 onwards and before 4.6.4, 4.5.10, and 4.4.14

Impact

An unauthenticated remote attacker can upload a malicious shared library (.so) to a writable share and force the server to load and execute it with root privileges

Mitigation

Upgrade Samba to the patched versions (4.6.4, 4.5.10, 4.4.14 or later) or add 'nt pipe support = no' to the smb.conf configuration file as a temporary workaround

Affected Products & Version Scope

Samba versions 3.5.0 and later, prior to 4.6.4, 4.5.10, and 4.4.14, where writable shares are accessible and the local path of the share can be determined

Remediation & Live Workaround Commands

PATCH & WORKAROUND

1. Official Patch & Version Upgrade Commands

Update Samba to the latest secure release using your operating system's package manager.

bash
# For Debian/Ubuntu-based systems
sudo apt-get update
sudo apt-get install --only-upgrade samba -y

# For RedHat/CentOS-based systems
sudo yum update samba -y

2. Temporary Workaround & Hardening Configuration

If patching cannot be performed immediately, disable named pipe support by modifying the Samba configuration file (smb.conf). Note that this workaround may prevent some Windows clients from executing administrative tasks.

bash
# Append 'nt pipe support = no' under the [global] section of smb.conf
sudo sed -i '/\[global\]/a \   nt pipe support = no' /etc/samba/smb.conf

# Restart the Samba service to apply changes
sudo systemctl restart smbd

3. Log Audit & IoC Verification Commands

Verify the running Samba version and inspect log files for suspicious shared library loading attempts or unusual pipe access.

bash
# 1. Check the currently installed Samba version
smbd -V

# 2. Search Samba logs for suspicious shared library loading attempts
# Look for unexpected 'dlopen' calls or paths pointing to user-writable shares.
sudo grep -ri 'dlopen' /var/log/samba/
Interactive SecOps Remediation Checklist
0/4 (0%)
Recommended Security Control & Mitigation Partner
NordLayer / Zero-Trust Network Access
Immediately upgrade Samba to a patched version or apply the 'nt pipe support = no' workaround to secure your infrastructure against remote code execution.

Stop Exposing VPN Ports to the Internet — Switch to Zero-Trust Access

Eliminate public-facing VPN concentrators and firewall management ports with identity-first Zero-Trust Network Access.

90% Attack Surface Reduction · Hardware-Free

Technical Root Cause & Exploitation Mechanics

1. Vulnerability Overview & Root Cause

This vulnerability (CVE-2017-7494, popularly known as SambaCry) resides in the way Samba handles Named Pipe connections. Samba fails to properly validate the pipe name requested by a client, mapping it directly to a local filesystem path and loading it as a shared library. Consequently, if an attacker can upload a shared library (.so file) to a writable share, they can trigger the server process (smbd) to load and execute it via a crafted pipe request.

2. Exploitation Mechanics & Attack Scenario

The exploitation flow consists of two primary phases:

  • Payload Delivery: The attacker uploads a compiled malicious shared library (e.g., exploit.so) to an accessible Samba share that permits write access.
  • Execution Trigger: The attacker connects to the IPC$ service and requests to open a named pipe using the relative or absolute path of the uploaded file (e.g., \\server\IPC$\path o\exploit.so).

Upon receiving this request, the Samba daemon invokes the dlopen() function on the specified path, loading the malicious code into the running process memory. Since smbd typically runs with root privileges, this leads to immediate and full system compromise.

3. Infrastructure & Business Impact

With a CVSS score of 9.8 (Critical) and an EPSS score of 0.9945, this vulnerability is highly critical and actively exploited in the wild. It is cataloged in CISA's KEV list, having been heavily leveraged by threat actors for ransomware deployment and cryptocurrency mining. A compromised file server within an enterprise network can serve as an entry point for lateral movement, leading to data exfiltration, backup destruction, and severe business disruption.

Official Vendor Advisories & References

Frequently Asked SecOps Questions (CVE-2017-7494)

FAQ

Q1. How critical is CVE-2017-7494 and is it actively exploited in the wild?

CVE-2017-7494 is rated CVSS 9.8 (CRITICAL) with a 30-day EPSS exploitation probability of 99.5%. It is listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, requiring immediate emergency remediation.

Q2. Which vendors and products are affected by CVE-2017-7494?

Primary impacted vendors include samba across samba. Scope summary: Samba versions 3.5.0 and later, prior to 4.6.4, 4.5.10, and 4.4.14, where writable shares are accessible and the local path of the share can be determined

Q3. What temporary mitigations or workarounds exist for CVE-2017-7494 before patching?

[Mitigation] Upgrade Samba to the patched versions (4.6.4, 4.5.10, 4.4.14 or later) or add 'nt pipe support = no' to the smb.conf configuration file as a temporary workaround Follow the CLI remediation commands and interactive SecOps checklist on this page to restrict exposure prior to your maintenance window.

SECOPS WORKBENCH INTEGRATION

Generate an Internal Engineering Notice or CISO Report for CVE-2017-7494

Instantly format this advisory into an executive CISO summary or engineering patch ticket.

Generate Report →

🔗 Related Advisories in Similar Stack (samba)

View Category →
SecOps Advisory Dispatch & RSS Feed

Subscribe to Daily Vulnerability Briefings & KEV Alerts

Concise morning briefings for SecOps, DevSecOps, and SRE teams covering newly exploited CVEs and mitigation priorities.

Slack / Teams / RSS Feed:
PatchKO
CVE-2017-7494 Samba Remote Code Execution (RCE) Vulnerability (CVE-2017-7494, SambaCry) Analysis and Mitigation Guide (CVSS 9.8) - Patch & Workaround | CVE Pulse