cve.bz

CVE-2017-7494 (SambaCry) Samba Remote Code Execution Vulnerability

9.8 criticalKEVExploitEPSS 99.4%Fix available

Known as SambaCry

Critical (9.8) in Samba Samba. In CISA KEV since 2023-03-30, with known ransomware use. EPSS 99.4% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 3.1

9.8 critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
99.4% (unchanged from 99.4% a week ago; 99.4% 30 days ago) estimated probability of exploitation activity in the next 30 days; 100th percentile. Scored 2026-11-21. A forecast for this CVE across the internet, not for your own systems.
CISA KEV
listed 2023-03-30, due 2023-04-20, known ransomware use
CISA's assessment (SSVC)
Exploitation: active · Automatable: yes · Technical impact: total, assessed 2025-02-07. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-94 Improper Control of Generation of Code (Code Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2017-7494 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2017-7494?via=ask-ai-copy and https://cve.bz/cve/CVE-2017-7494?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2017-7494 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
samba:sambafrom 3.5.0 before 4.4.0
samba:sambafrom 4.4.0 before 4.4.14
samba:sambafrom 4.5.0 before 4.5.10
samba:sambafrom 4.6.0 before 4.6.4
debian:debian_linux8.0

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian7samba2:3.6.6-6+deb7u13DLA-951-1
Debian8samba2:4.2.14+dfsg-0+deb8u6DSA-3860-1
Debian12, 13, 14samba2:4.5.8+dfsg-2DEBIAN-CVE-2017-7494
Ubuntu14.04:LTSsamba2:4.3.11+dfsg-0ubuntu0.14.04.8UBUNTU-CVE-2017-7494 USN-3296-1
Ubuntu16.04:LTSsamba2:4.3.11+dfsg-0ubuntu0.16.04.7UBUNTU-CVE-2017-7494 USN-3296-1
Red Hatenterprise_linux:6::client, enterprise_linux:6::computenode, enterprise_linux:6::server and 1 moresamba, samba-doc, samba-swat and 11 more0:3.6.23-43.el6_9RHSA-2017:1270
Red Hatenterprise_linux:6::client, enterprise_linux:6::computenode, enterprise_linux:6::server and 1 moresamba4, samba4-dc, samba4-libs and 11 more0:4.2.10-10.el6_9RHSA-2017:1271
Red Hatenterprise_linux:7::client, enterprise_linux:7::computenode, enterprise_linux:7::workstationsamba, samba-dc, samba-libs and 22 more0:4.4.4-14.el7_3RHSA-2017:1270
Red Hatenterprise_linux:7::serverctdb, samba, samba-dc and 24 more0:4.4.4-14.el7_3RHSA-2017:1270
Red Hatrhel_aus:6.4::serversamba, samba-doc, samba-swat and 10 more0:3.6.23-32.el6_4RHSA-2017:1390
Red Hatrhel_aus:6.5::server, rhel_tus:6.5::serversamba, samba-doc, samba-swat and 10 more0:3.6.23-32.el6_5RHSA-2017:1390
Red Hatrhel_aus:6.6::server, rhel_tus:6.6::serversamba, samba-doc, samba-swat and 10 more0:3.6.23-32.el6_6RHSA-2017:1390
Red Hatrhel_els:5samba3x, samba3x-doc, samba3x-swat and 6 more0:3.6.23-14.el5_11RHSA-2017:1272
Red Hatrhel_eus:6.7::computenode, rhel_eus:6.7::serversamba, samba-doc, samba-swat and 11 more0:3.6.23-32.el6_7RHSA-2017:1390
Red Hatrhel_eus:7.1::serverctdb, ctdb-devel, ctdb-tests and 1 more0:4.2.10-11.el7_2RHSA-2017:1390
Red Hatrhel_eus:7.2::computenode, rhel_eus:7.2::serversamba, samba-dc, samba-libs and 22 more0:4.2.10-11.el7_2RHSA-2017:1390
Red Hatrhel_mission_critical:6.2::serversamba, samba-doc, samba-swat and 10 more0:3.6.23-32.el6_2RHSA-2017:1390
2 more for Red Hat in the JSON and on Red Hat's page.
SUSELinux Enterprise Desktop 12 SP1, Linux Enterprise Desktop 12 SP2, Linux Enterprise High Availability Extension 12 SP1 and 7 moresamba4.2.4-28.14.1SUSE-SU-2017:1392-1
SUSELinux Enterprise Desktop 12 SP2, Linux Enterprise High Availability Extension 12 SP2, Linux Enterprise Server 12 SP2 and 3 moresamba4.4.2-38.6.1SUSE-SU-2017:1393-1
SUSELinux Enterprise Point of Sale 11 SP3, Linux Enterprise Server 11 SP3-LTSS, Linux Enterprise Server 11 SP3-TERADATA and 2 moresamba, samba-doc3.6.3-93.1SUSE-SU-2017:1391-1
SUSELinux Enterprise Server 12-LTSS, Linux Enterprise Server for SAP Applications 12samba4.2.4-18.41.1SUSE-SU-2017:1396-1
SUSELinux Enterprise Software Development Kit 11 SP4samba3.6.3-93.1SUSE-SU-2017:1391-1
openSUSETumbleweedsamba4.14.6+git.182.2205d5224e3-1.1openSUSE-SU-2024:11365-1
Alpinev3.3samba4.2.14-r3ALPINE-CVE-2017-7494
Alpinev3.4samba4.4.14-r0ALPINE-CVE-2017-7494
Azure Linux3sambano fix listedAZL-110360

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; the Alpine secdb, CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Important.

Red Hat's statement

This vulnerability exists in the samba server, client side packages are not affected.

Red Hat's mitigation

Any of the following:

1. SELinux is enabled by default and our default policy prevents loading of modules from outside of samba's module directories and therefore blocks the exploit

2. Mount the filesystem which is used by samba for its writable share using "noexec" option.

3. Add the parameter:

nt pipe support = no

to the [global] section of your smb.conf and restart smbd. This prevents clients from accessing any named pipe endpoints. Note this can disable some expected functionality for Windows clients.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 5 Extended Lifecycle Supportsamba3x-0:3.6.23-14.el5_11Fixed 2017-05-24RHSA-2017:1272
Red Hat Enterprise Linux 6samba-0:3.6.23-43.el6_9Fixed 2017-05-24RHSA-2017:1270
Red Hat Enterprise Linux 6samba4-0:4.2.10-10.el6_9Fixed 2017-05-24RHSA-2017:1271
Red Hat Enterprise Linux 6.2 Advanced Update Supportsamba-0:3.6.23-32.el6_2Fixed 2017-06-05RHSA-2017:1390
Red Hat Enterprise Linux 6.4 Advanced Update Supportsamba-0:3.6.23-32.el6_4Fixed 2017-06-05RHSA-2017:1390
Red Hat Enterprise Linux 6.5 Advanced Update Supportsamba-0:3.6.23-32.el6_5Fixed 2017-06-05RHSA-2017:1390
Red Hat Enterprise Linux 6.5 Telco Extended Update Supportsamba-0:3.6.23-32.el6_5Fixed 2017-06-05RHSA-2017:1390
Red Hat Enterprise Linux 6.6 Advanced Update Supportsamba-0:3.6.23-32.el6_6Fixed 2017-06-05RHSA-2017:1390
Red Hat Enterprise Linux 6.6 Telco Extended Update Supportsamba-0:3.6.23-32.el6_6Fixed 2017-06-05RHSA-2017:1390
Red Hat Enterprise Linux 6.7 Extended Update Supportsamba-0:3.6.23-32.el6_7Fixed 2017-06-05RHSA-2017:1390
Red Hat Enterprise Linux 7samba-0:4.4.4-14.el7_3Fixed 2017-05-24RHSA-2017:1270
Red Hat Enterprise Linux 7.2 Extended Update Supportsamba-0:4.2.10-11.el7_2Fixed 2017-06-05RHSA-2017:1390
Red Hat Gluster Storage 3.2 for RHEL 6samba-0:4.4.6-5.el6rhsFixed 2017-05-24RHSA-2017:1273
Red Hat Gluster Storage 3.2 for RHEL 7samba-0:4.4.6-5.el7rhgsFixed 2017-05-24RHSA-2017:1273
Red Hat Enterprise Linux 5sambaNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2017-7494.

ICS advisories (CISA)

AdvisoryTitlePublishedSectorsAffectedFixed
ICSA-17-180-02Schneider Electric U.motion Builder (Update A)2017-06-29Commercial Facilities, Critical Manufacturing, and EnergyU.motion Builder: Versions 1.2.1 and priornone listed

From CISA's ICS advisories (CSAF), provided under CISA's notification. Only the facts are shown; each advisory is on CISA's page. Credits.

Public exploits

GitHub PoC

Repositories on GitHub named after this CVE or listed for it by the PoC-in-GitHub index. For those marked Harbor Check: matches CVE, Flawharbor read the code and found it implements this CVE's exploitation technique: read, not run, and its dependencies only checked for warning signs, so a pointer and no guarantee. The rest are unverified: some hold a working proof of concept, some nothing useful, and some malware made to look like one. Read the code before you run any of it. How Harbor Check reads them, and what it found.

Detection rules

Ways to detect this CVE, not exploit code: the nuclei template that checks a system for it, and the Suricata and Snort rules that name it. A rule set may ship a rule turned off, so check yours by its sid.

Attack patterns (CAPEC)

  • CAPEC-35 Leverage Executable Code in Non-Executable Files Likelihood: High · Severity: Very High
  • CAPEC-77 Manipulating User-Controlled Variables Likelihood: High · Severity: Very High
  • CAPEC-242 Code Injection Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON