Outdated Samba

A Samba file server or domain controller runs a release older than those that fix published Samba security advisories.

SeverityHigh
CVSS 3.17.5 CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H Open in the calculator
CVSS 4.07.7 CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N Open in the calculator
CWECWE-1395: Dependency on Vulnerable Third-Party Component
OWASP Top 10A03:2025 Software Supply Chain Failures
MITRE ATT&CKT1210 Exploitation of Remote Services
CategoryOutdated Components

Description

A host is running a version of Samba, the open source implementation of SMB file sharing and of Active Directory domain controller services, that is older than the releases that fix vulnerabilities published in Samba security advisories, or a release series that the Samba project no longer maintains. Samba is common on Linux file servers, network attached storage devices and appliances, and is sometimes used as an Active Directory domain controller.

Samba vulnerabilities range from denial of service and information disclosure to remote code execution. The most serious let an attacker who can reach the SMB service, and in some cases write to a share, run code on the server, often as root, giving access to every share and file it holds and a foothold for moving further into the network. Well-known examples include CVE-2017-7494, which allowed a client able to write to a share to upload a shared library and cause the server to load and run it, and CVE-2021-44142, an out-of-bounds heap read and write in the vfs_fruit module used for Apple client compatibility, which could lead to code execution as root. Other flaws allow an attacker to crash the service or read data they should not see.

Many flaws affect only domain controller deployments or need an authenticated user, so the exposure depends on how Samba is configured. On a Samba Active Directory domain controller, flaws can allow privilege escalation within the domain or forged authentication, which affects every system that trusts the domain. The risk is greatest where SMB is reachable from untrusted networks, where guest or anonymous write access is allowed, and on appliances whose Samba version depends on vendor firmware updates.

The version can sometimes be read from the server's SMB responses, and is otherwise confirmed from the installed package on the host. Linux distributions often backport security fixes into older version numbers, so a version string alone can overstate the risk; the distribution's own advisories, or a credentialed check of the package release, give a reliable answer. The Samba project maintains only a few release series at a time, and older series stop receiving security fixes.

Remediation

Update Samba to a release that contains all published fixes:

  • Apply the distribution's latest Samba security updates through the package manager or, where Samba is built from source, upgrade to the latest release of a series that is still maintained. Plan a move off any series that no longer receives security fixes.
  • For network attached storage devices and appliances, install the vendor's latest firmware, as the Samba version is controlled by the vendor, and replace devices that no longer receive updates.
  • Subscribe to Samba security announcements or the distribution's security advisories.

Reduce exposure while updates are planned: block SMB (TCP port 445, and 139 where NetBIOS is used) at network boundaries so that it is reachable only by the clients that need it; remove guest access and anonymous write access to shares; and disable optional modules that are not needed, for example by removing fruit from the vfs objects setting where Apple clients do not use the share. Some advisories give a specific configuration workaround, such as setting nt pipe support = no in the global section of smb.conf for CVE-2017-7494; use these only as a stopgap, as they can disable features that Windows clients expect. Confirm the fix by checking the installed package release against the distribution's advisories, or the Samba version against the fixed releases in each Samba advisory.

References


Add This Finding to Your Library

In Pental this write-up is in Settings, Library. Add to my library copies it into your own, rated in your firm's CVSS version, ready to put in your own words.

Free trial  ·  No card required

Only need the reporting? Our reporting tool is free and open source, with the same library.


More Patching and Outdated Software Findings

Every Patching and Outdated Software finding