Security Advisory

CVE-2017-7494: Samba Writable-Share Code Execution

Last updated:
  • CVE-2017-7494

CVE-2017-7494, often called SambaCry, lets a client with write access to any Samba share upload a shared library and make smbd load and run it. It affects Samba 3.5.0 up to the 4.6.4, 4.5.10 and 4.4.14 fixes, scores 9.8 in NVD, and has been in the CISA KEV catalog since 2023-03-30 with known ransomware use.

Vulnerability summary

CVSS base score

9.8

Critical severity

EPSS score (FIRST)

99.4%

Probability of exploitation in the wild in the next 30 days

CISA KEV catalog

Yes

Listed as known exploited

Published

Vulnerability ID: CVE-2017-7494 · Source: NVD

Affected components

ComponentCPEVersion range
Samba (smbd)cpe:2.3:a:samba:samba:*:*:*:*:*:*:*:*3.5.0 up to 4.4.14, 4.5.0 up to 4.5.10 and 4.6.0 up to 4.6.4 (fixed in 4.4.14, 4.5.10 and 4.6.4, released 2017-05-24)
Synology DiskStation Manager (DSM)—DSM 4.1 to 6.1 on all Synology models; fixed in 6.1.1-15101-04, 6.0.3-8754-1, 5.2-5967-3 and 4.2-3259 (per Synology-SA-17:18)
Synology Router Manager (SRM)—SRM 1.1; fixed in 1.1.4-6509-1 (per Synology-SA-17:18)

What does this mean for affected devices?

CVE-2017-7494 is a code injection flaw (CWE-94) in smbd. Samba's announcement says that all versions from 3.5.0 onwards allow "a malicious client to upload a shared library to a writable share, and then cause the server to load and execute it". Samba 4.6.4, 4.5.10 and 4.4.14 fixed it on 2017-05-24, and Samba published patches for older releases. NVD scores it 9.8 (critical) with vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H and files it under cpe:2.3:a:samba:samba in four ranges, 3.5.0 up to 4.4.14 and the 4.5 and 4.6 series below their fixes (NVD).

NAS boxes and storage routers are the device case, because they exist to offer writable shares. Synology's Synology-SA-17:18, published on 2017-05-25, lists DiskStation Manager 4.1 through 6.1 and Synology Router Manager 1.1 as affected on all Synology models, and fixes them in DSM 6.1.1-15101-04, 6.0.3-8754-1, 5.2-5967-3 and 4.2-3259 and SRM 1.1.4-6509-1. Users of DSM 5.1, 5.0 and 4.3 had to move to DSM 5.2, and DSM 4.1 users to 4.2. A router running SRM next to a NAS running DSM is the same flaw in two firmware lines with different fixed builds.

The preconditions are a writable share and smbd that loads the uploaded file. A guest-writable share, common on consumer storage for plugging in a USB drive, removes the need for a password. Our Samba vulnerabilities in embedded firmware guide shows how to find the Samba version, the shares and the effective smb.conf in an image, and how this CVE ranks against the vfs_fruit flaw CVE-2021-44142 and the pipe-name traversal CVE-2023-3961.

CISA added it to the KEV catalog on 2023-03-30 with a due date of 2023-04-20 and marks known ransomware campaign use; it is still listed as of 2026-11-16 (catalog version 2026.11.13, CISA KEV). FIRST EPSS gives it 0.994, the 99.9th percentile, in its 2026-11-15 dataset (FIRST EPSS). Our KEV and EPSS prioritisation guide explains why a KEV listing with ransomware use puts an old CVE at the top of a device backlog.

The fix is a Samba build at or above 4.4.14, 4.5.10 or 4.6.4, or a backport of Samba's patch. Old trees were fixed by backport: the Debian tracker lists 2:3.6.6-6+deb7u13 for wheezy (DLA-951-1) and 2:4.2.14+dfsg-0+deb8u6 for jessie (DSA-3860-1), so a version string below 4.4.14 does not by itself prove a device is vulnerable. Where a firmware update cannot ship at once, Samba's workaround is nt pipe support = no in the [global] section, which stops clients from opening named pipe endpoints and, Samba warns, can disable some expected functionality for Windows clients. Remove guest write access and keep ports 139 and 445 off the WAN either way. Record the result per product in a VEX statement, as our CSAF and VEX for device makers guide shows.

How to fix this class of issueThis advisory's weakness class is Command injection. Our practical guide covers how to detect, fix, verify and disclose it: How to fix command injection in embedded firmware.

Evidence

  • All Samba versions from 3.5.0 let a client upload a shared library to a writable share and make the server load it; fixed in 4.6.4, 4.5.10 and 4.4.14; workaround nt pipe support = no. — Samba security announcement
  • NVD CVSS v3.1 9.8 (Primary), CWE-94, CPE ranges 3.5.0-4.4.14, 4.5.0-4.5.10, 4.6.0-4.6.4. — NVD
  • DSM 4.1-6.1 and SRM 1.1 affected on all Synology models; fixed builds listed. — Synology-SA-17:18
  • Backports: wheezy 2:3.6.6-6+deb7u13 (DLA-951-1), jessie 2:4.2.14+dfsg-0+deb8u6 (DSA-3860-1). — Debian Security Tracker
  • In KEV, added 2023-03-30, due 2023-04-20, knownRansomwareCampaignUse Known; catalog version 2026.11.13 read 2026-11-16. — CISA KEV
  • EPSS 0.99448 (99.9th percentile), dataset 2026-11-15, read 2026-11-16. — FIRST EPSS

Related advisories

Sources

  1. NVD
  2. Samba security announcement CVE-2017-7494
  3. Synology-SA-17:18 Samba
  4. Debian Security Tracker
  5. CISA KEV
  6. CISA KEV data (catalog JSON)
  7. FIRST EPSS

Frequently asked questions

Which Samba versions are affected by CVE-2017-7494?

Every release from 3.5.0 until the fixes: 4.4.x before 4.4.14, 4.5.x before 4.5.10 and 4.6.x before 4.6.4, plus all 3.5 to 4.3 releases without Samba's patch. Distribution backports such as Debian's 3.6.6-6+deb7u13 also close it (per Samba, NVD and the Debian Security Tracker).

Which NAS and router firmware is affected by CVE-2017-7494?

Synology-SA-17:18 lists DSM 4.1 to 6.1 on all Synology models and SRM 1.1, fixed in DSM 6.1.1-15101-04, 6.0.3-8754-1, 5.2-5967-3, 4.2-3259 and SRM 1.1.4-6509-1. Any other device with a writable share on an unpatched Samba in the affected range carries the same flaw (per Synology and Samba).

Is CVE-2017-7494 exploited in the wild?

Yes. CISA added it to the KEV catalog on 2023-03-30 and marks known ransomware campaign use, and it is still listed as of 2026-11-16 (catalog 2026.11.13). FIRST EPSS gives it 0.994 in the 2026-11-15 dataset (per CISA KEV and FIRST EPSS).

Is there a workaround for CVE-2017-7494 without a firmware update?

Samba's workaround is nt pipe support = no in the [global] section of smb.conf followed by an smbd restart; it blocks named pipe endpoints and can break some Windows client functions. Removing guest write access and blocking ports 139 and 445 on the WAN reduce exposure further (per Samba's announcement).