CVE-2017-7494

CVE-2017-7494 is a critical-severity vulnerability in Samba with a CVSS 3.x base score of 9.8. It is listed in CISA's Known Exploited Vulnerabilities (KEV) catalog, confirming it has been exploited in the wild (added 2023-03-30). The underlying weakness is classified as CWE-94.

Key facts

Description

Samba since version 3.5.0 and before 4.6.4, 4.5.10 and 4.4.14 is vulnerable to remote code execution vulnerability, allowing a malicious client to upload a shared library to a writable share, and then cause the server to load and execute it.

CVE-2017-7494: Samba Remote Code Execution via Shared Library Upload (SambaCry)

AI-generated analysis based on the vulnerability data on this page.

Field Value
CVE ID CVE-2017-7494
Published 2017-05-30
CVSS v2 10.0 (AV:N/AC:L/Au:N/C:C/I:C/A:C)
CVSS v3.1 9.8 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H)
CWE CWE-94: Code Injection
EPSS 0.99448 (99.94th percentile)
KEV Yes (CISA catalog, added 2023-03-30)
EU Exploited Yes (since 2023-03-30)

Summary

CVE-2017-7494 is a critical remote code execution (RCE) vulnerability in Samba, the widely-deployed open-source SMB/CIFS file server. A malicious client can upload a shared library to a writable Samba share and then cause the server to load and execute it, yielding full remote compromise with no authentication required.

Background

Samba implements the SMB/CIFS protocol suite, enabling Linux and Unix systems to interoperate with Windows file-sharing networks. The vulnerability resides in the server's handling of named pipes and shared library loading, specifically when the nt pipe support = yes configuration option is enabled (the default). Because Samba often runs with root privileges and exposed shares are common in enterprise and NAS environments, this flaw presents a high-impact, easily exploitable attack surface.

Root Cause

The flaw maps to CWE-94: Code Injection. Samba allows remote clients to open a named pipe and provide a path to a shared library. When processing this pipe, the server passes the client-supplied path directly to the dynamic loader via internal IPC mechanisms. If the attacker can write a malicious .so file to any writable share on the target server, they can reference that path in the pipe request, causing the Samba process to load and execute attacker-controlled code in its security context. The root cause is a lack of path validation and unsafe dynamic library loading from attacker-influenced locations.

Impact

CVSS v3.1 Metric Value Interpretation
Attack Vector Network Exploitable remotely
Attack Complexity Low No special conditions
Privileges Required None Unauthenticated
User Interaction None Fully automated
Scope Unchanged Impact limited to host
Confidentiality High Full data disclosure
Integrity High Full data modification
Availability High Full service disruption

An unauthenticated attacker can achieve arbitrary code execution as the Samba process user (often root). This enables complete system takeover, ransomware deployment, lateral movement, and data exfiltration. The vulnerability is especially severe in environments where Samba shares are internet-facing or exposed to untrusted internal networks.

Exploitation Walkthrough

Defensive / generic overview only — no weaponized exploit code.

The attack typically proceeds as follows:

  1. Reconnaissance: Identify a Samba server with a writable share (e.g., via smbclient enumeration or network scanning).
  2. Upload: Write a malicious shared library file to the writable share path.
  3. Trigger: Open a named pipe connection to the Samba server and send a request that references the uploaded library path.
  4. Execution: The Samba process loads the library, executing the attacker's payload in the server's process context.

Public exploit code was published to Exploit-DB shortly after disclosure (entries 42060 and 42084). The attack complexity is low, and reliable exploitation is possible with standard tools. This information is provided for defensive awareness only. Administrators should assume active exploitation based on the CISA KEV listing and the high EPSS score.

Affected and Patched Versions

Affected:

  • Samba 3.5.0 and later, through versions before 4.6.4, 4.5.10, and 4.4.14
  • Debian Linux 8.0 (with affected Samba versions)

Patched:

  • Samba 4.6.4, 4.5.10, 4.4.14, and all subsequent versions

Vendors including Red Hat, SUSE, Debian, and HPE released security advisories and patched packages for their respective distributions. The specific patched versions vary by distribution; consult your vendor's security advisory for exact package numbers.

Remediation

Primary:

  • Upgrade Samba to a patched version (4.6.4, 4.5.10, 4.4.14, or later).
  • Apply vendor-supplied security updates (e.g., RHSA-2017:1270 through RHSA-2017:1390, DSA-3860, SUSE-SU-2017:1391-1).

Compensating Controls (if immediate patching is not possible):

  • Disable nt pipe support in smb.conf by setting nt pipe support = no and restarting the Samba service. Note that this may break some Windows client functionality.
  • Restrict Samba shares to authenticated users and disable anonymous/guest write access.
  • Ensure Samba is not exposed to untrusted networks or the internet (block TCP/445 at the perimeter).
  • Run the Samba service under a non-root account with minimal privileges where possible.

Detection

  • Network: Monitor for anomalous SMB file uploads to shared directories followed by named pipe connections.
  • Endpoint: Alert on unexpected .so file creation in Samba share paths and subsequent library loading by the smbd process.
  • Behavioral: Look for post-exploitation indicators such as new user creation, shell execution, or network connections initiated by the Samba process.
  • Threat Intelligence: Correlate with CISA KEV and EU exploited vulnerability databases.

Assessment

CVE-2017-7494 is a textbook high-severity, high-probability vulnerability. Its inclusion in the CISA Known Exploited Vulnerabilities catalog (added 2023-03-30) and an EPSS score of 0.99448 confirm near-universal exploitation in the wild. The combination of unauthenticated remote access, low attack complexity, and full CIA impact makes this a critical patching priority for any organization running legacy Samba versions.

Key lessons:

  1. Default configurations like nt pipe support = yes can carry hidden risk; periodic configuration hardening reviews are essential.
  2. Writable network shares remain a perennial attack vector — restrict write permissions and monitor file creation events aggressively.

References

Frequently asked questions

What is CVE-2017-7494?
Samba since version 3.5.0 and before 4.6.4, 4.5.10 and 4.4.14 is vulnerable to remote code execution vulnerability, allowing a malicious client to upload a shared library to a writable share, and then cause the server to load and execute it.
How severe is CVE-2017-7494?
CVE-2017-7494 has a CVSS 3.x base score of 9.8, rated critical severity. It is exploitable over network with low attack complexity, requires no privileges and no user interaction. Impact on confidentiality is high, integrity high, and availability high.
Is CVE-2017-7494 being actively exploited?
Yes. CVE-2017-7494 is on CISA's Known Exploited Vulnerabilities (KEV) catalog, added on 2023-03-30, which means active exploitation has been confirmed. It should be prioritised for remediation.
What products are affected by CVE-2017-7494?
CVE-2017-7494 primarily affects Samba. In total, 2 product configurations (CPEs) are listed as vulnerable; see the affected-products list for the exact versions.
How do I fix CVE-2017-7494?
Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Because this CVE is known to be actively exploited, treat remediation as urgent — CISA KEV typically sets a short remediation deadline.
Does CVE-2017-7494 have an EU (EUVD) identifier?
Yes. CVE-2017-7494 is tracked in the ENISA EU Vulnerability Database (EUVD) as EUVD-2017-16511. It is also flagged as exploited in the EUVD (since 2023-03-30).
When was CVE-2017-7494 published?
CVE-2017-7494 was published on 2017-05-30 and last updated on 2026-06-17.

References

Affected products (2)

More vulnerabilities in Samba

All CVEs affecting Samba →

Other CWE-94 (Code Injection) vulnerabilities

Browse all CWE-94 (Code Injection) vulnerabilities →