Samba Samba

Don't miss out!

Thousands of developers use stack.watch to stay informed.
Get an email whenever new security vulnerabilities are reported in Samba.

Known Exploited Samba Vulnerabilities

The following Samba vulnerabilities have been marked by CISA as Known to be Exploited by threat actors.

Title Description Added
Samba Remote Code Execution Vulnerability Samba contains a 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 Exploit Probability: 94.2%
March 30, 2023

The vulnerability CVE-2017-7494: Samba Remote Code Execution Vulnerability is in the top 1% of the currently known exploitable vulnerabilities.

By the Year

In 2026 there have been 0 vulnerabilities in Samba. Last year, in 2025 Samba had 3 security vulnerabilities published. Right now, Samba is on track to have less security vulnerabilities in 2026 than it did last year.




Year Vulnerabilities Average Score
2026 0 0.00
2025 3 6.40
2024 1 7.50
2023 21 6.60
2022 26 7.41
2021 4 7.00
2020 14 6.10
2019 13 6.55
2018 19 6.64

It may take a day or so for new Samba vulnerabilities to show up in the stats or in the list of recent security vulnerabilities. Additionally vulnerabilities may be tagged under a different product or component name.

Recent Samba Security Vulnerabilities

Samba WINS Hook RCE via Unvalidated NetBIOS Names
CVE-2025-10230 10 - Critical - November 07, 2025

A flaw was found in Samba, in the front-end WINS hook handling: NetBIOS names from registration packets are passed to a shell without proper validation or escaping. Unsanitized NetBIOS name data from WINS registration packets are inserted into a shell command and executed by the Samba Active Directory Domain Controllers wins hook, allowing an unauthenticated network attacker to achieve remote command execution as the Samba process.

Shell injection

Samba vfs_streams_xattr Heap LE Leading to ID Disclosure
CVE-2025-9640 4.3 - Medium - October 15, 2025

A flaw was found in Samba, in the vfs_streams_xattr module, where uninitialized heap memory could be written into alternate data streams. This allows an authenticated user to read residual memory content that may include sensitive data, resulting in an information disclosure vulnerability.

Use of Uninitialized Resource

Samba smbd Group Membership Flaw Exposes Shares
CVE-2025-0620 4.9 - Medium - June 06, 2025

A flaw was found in Samba. The smbd service daemon does not pick up group membership changes when re-authenticating an expired SMB session. This issue can expose file shares until clients disconnect and then connect again.

Files or Directories Accessible to External Parties

Samba Active Directory Object Creation Privilege Escalation Vulnerability
CVE-2020-25720 7.5 - High - November 17, 2024

A vulnerability was found in Samba where a delegated administrator with permission to create objects in Active Directory can write to all attributes of the newly created object, including security-sensitive attributes, even after the object's creation. This issue occurs because the administrator owns the object due to the lack of an Access Control List (ACL) at the time of creation and later being recognized as the 'creator owner.' The retained significant rights of the delegated administrator may not be well understood, potentially leading to unintended privilege escalation or security risks.

Permissions, Privileges, and Access Controls

Samba idmap Multi-threading Race Causing Feature Abuse
CVE-2023-46768 7.5 - High - November 08, 2023

Multi-thread vulnerability in the idmap module. Successful exploitation of this vulnerability may cause features to perform abnormally.

Dangling pointer

Samba DirSync Control Exposes AD Secrets to RODC and Privileged Users
CVE-2023-4154 6.5 - Medium - November 07, 2023

A design flaw was found in Samba's DirSync control implementation, which exposes passwords and secrets in Active Directory to privileged users and Read-Only Domain Controllers (RODCs). This flaw allows RODCs and users possessing the GET_CHANGES right to access all attributes, including sensitive secrets and passwords. Even in a default setup, RODC DC accounts, which should only replicate some passwords, can gain access to all domain secrets, including the vital krbtgt, effectively eliminating the RODC / DC distinction. Furthermore, the vulnerability fails to account for error conditions (fail open), like out-of-memory situations, potentially granting access to secret attributes, even under low-privileged attacker influence.

Memory Corruption

Samba rpcecho RPC DoS via dcesrv_echo_TestSleep()
CVE-2023-42669 6.5 - Medium - November 06, 2023

A vulnerability was found in Samba's "rpcecho" development server, a non-Windows RPC server used to test Samba's DCE/RPC stack elements. This vulnerability stems from an RPC function that can be blocked indefinitely. The issue arises because the "rpcecho" service operates with only one worker in the main RPC task, allowing calls to the "rpcecho" server to be blocked for a specified time, causing service disruptions. This disruption is triggered by a "sleep()" call in the "dcesrv_echo_TestSleep()" function under specific conditions. Authenticated users or attackers can exploit this vulnerability to make calls to the "rpcecho" server, requesting it to block for a specified duration, effectively disrupting most services and leading to a complete denial of service on the AD DC. The DoS affects all other services as "rpcecho" runs in the main RPC task.

Resource Exhaustion

Samba Pipe Name Path Traversal Potential Priv Escalation
CVE-2023-3961 9.1 - Critical - November 03, 2023

A path traversal vulnerability was identified in Samba when processing client pipe names connecting to Unix domain sockets within a private directory. Samba typically uses this mechanism to connect SMB clients to remote procedure call (RPC) services like SAMR LSA or SPOOLSS, which Samba initiates on demand. However, due to inadequate sanitization of incoming client pipe names, allowing a client to send a pipe name containing Unix directory traversal characters (../). This could result in SMB clients connecting as root to Unix domain sockets outside the private directory. If an attacker or client managed to send a pipe name resolving to an external service using an existing Unix domain socket, it could potentially lead to unauthorized access to the service and consequential adverse events, including compromise or service crashes.

Directory traversal

Samba SMB Truncation via acl_xattr despite Read-Only
CVE-2023-4091 6.5 - Medium - November 03, 2023

A vulnerability was discovered in Samba, where the flaw allows SMB clients to truncate files, even with read-only permissions when the Samba VFS module "acl_xattr" is configured with "acl_xattr:ignore system acls = yes". The SMB protocol allows opening files when the client requests read-only access but then implicitly truncates the opened file to 0 bytes if the client specifies a separate OVERWRITE create disposition request. The issue arises in configurations that bypass kernel file system permissions checks, relying solely on Samba's permissions.

Incorrect Default Permissions

Samba RPC Listener Abuse Enables AD DC Disruption
CVE-2023-42670 6.5 - Medium - November 03, 2023

A flaw was found in Samba. It is susceptible to a vulnerability where multiple incompatible RPC listeners can be initiated, causing disruptions in the AD DC service. When Samba's RPC server experiences a high load or unresponsiveness, servers intended for non-AD DC purposes (for example, NT4-emulation "classic DCs") can erroneously start and compete for the same unix domain sockets. This issue leads to partial query responses from the AD DC, causing issues such as "The procedure number is out of range" when using tools like Active Directory Users. This flaw allows an attacker to disrupt AD DC services.

Resource Exhaustion

Samba Auth Heap Overflow DoS
CVE-2023-5568 6.5 - Medium - October 25, 2023

A heap-based Buffer Overflow flaw was discovered in Samba. It could allow a remote, authenticated attacker to exploit this vulnerability to cause a denial of service.

Memory Corruption

Samba OOB Read in Winbind NTLM Auth Crash
CVE-2022-2127 5.9 - Medium - July 20, 2023

An out-of-bounds read vulnerability was found in Samba due to insufficient length checks in winbindd_pam_auth_crap.c. When performing NTLM authentication, the client replies to cryptographic challenges back to the server. These replies have variable lengths, and Winbind fails to check the lan manager response length. When Winbind is used for NTLM authentication, a maliciously crafted request can trigger an out-of-bounds read in Winbind, possibly resulting in a crash.

Out-of-bounds Read

Samba mdssvc Spotlight RPC Infinite Loop DoS
CVE-2023-34966 7.5 - High - July 20, 2023

An infinite loop vulnerability was found in Samba's mdssvc RPC service for Spotlight. When parsing Spotlight mdssvc RPC packets sent by the client, the core unmarshalling function sl_unpack_loop() did not validate a field in the network packet that contains the count of elements in an array-like structure. By passing 0 as the count value, the attacked function will run in an endless loop consuming 100% CPU. This flaw allows an attacker to issue a malformed RPC request, triggering an infinite loop, resulting in a denial of service condition.

Infinite Loop

Samba SMB2 Packet Signing bypass enables MITM
CVE-2023-3347 5.9 - Medium - July 20, 2023

A vulnerability was found in Samba's SMB2 packet signing mechanism. The SMB2 packet signing is not enforced if an admin configured "server signing = required" or for SMB2 connections to Domain Controllers where SMB2 packet signing is mandatory. This flaw allows an attacker to perform attacks, such as a man-in-the-middle attack, by intercepting the network traffic and modifying the SMB2 messages between client and server, affecting the integrity of the data.

Improper Verification of Cryptographic Signature

Samba Spotlight Path Disclosure: Server File Paths Exposed
CVE-2023-34968 5.3 - Medium - July 20, 2023

A path disclosure vulnerability was found in Samba. As part of the Spotlight protocol, Samba discloses the server-side absolute path of shares, files, and directories in the results for search queries. This flaw allows a malicious client or an attacker with a targeted RPC request to view the information that is part of the disclosed path.

Insertion of Sensitive Information Into Sent Data

Samba mdssvc RPC Type Confusion Crash
CVE-2023-34967 5.3 - Medium - July 20, 2023

A Type Confusion vulnerability was found in Samba's mdssvc RPC service for Spotlight. When parsing Spotlight mdssvc RPC packets, one encoded data structure is a key-value style dictionary where the keys are character strings, and the values can be any of the supported types in the mdssvc protocol. Due to a lack of type checking in callers of the dalloc_value_for_key() function, which returns the object associated with a key, a caller may trigger a crash in talloc_get_size() when talloc detects that the passed-in pointer is not a valid talloc pointer. With an RPC worker process shared among multiple client connections, a malicious client or attacker can trigger a process crash in a shared RPC mdssvc worker process, affecting all other clients this worker serves.

Object Type Confusion

Samba AD DC Admin Tool Sends Passwords Signed-Only LDAP CVE-2023-0922
CVE-2023-0922 5.9 - Medium - April 03, 2023

The Samba AD DC administration tool, when operating against a remote LDAP server, will by default send new or reset passwords over a signed-only connection.

Cleartext Transmission of Sensitive Information

Samba DNS Hostname AccessCheck Bypass Enables Attribute Deletion
CVE-2023-0225 4.3 - Medium - April 03, 2023

A flaw was found in Samba. An incomplete access check on dnsHostName allows authenticated but otherwise unprivileged users to delete this attribute from any object in the directory.

Incorrect Permission Assignment for Critical Resource

Samba AD DC LDAP Filter Flaw Exposes BitLocker Keys (4.6.16/4.7.9/4.8.4/4.9.7)
CVE-2023-0614 6.5 - Medium - April 03, 2023

The fix in 4.6.16, 4.7.9, 4.8.4 and 4.9.7 for CVE-2018-10919 Confidential attribute disclosure vi LDAP filters was insufficient and an attacker may be able to obtain confidential BitLocker recovery keys from a Samba AD DC.

Cleartext Storage of Sensitive Information

Samba Password Lockout Race Condition Enables BruteForce
CVE-2021-20251 5.9 - Medium - March 06, 2023

A flaw was found in samba. A race condition in the password lockout code may lead to the risk of brute force attacks being successful if special conditions are met.

Race Condition

Elev. of Privilege via Windows Kerberos RC4-HMAC Tickets
CVE-2022-45141 9.8 - Critical - March 06, 2023

Since the Windows Kerberos RC4-HMAC Elevation of Privilege Vulnerability was disclosed by Microsoft on Nov 8 2022 and per RFC8429 it is assumed that rc4-hmac is weak, Vulnerable Samba Active Directory DCs will issue rc4-hmac encrypted tickets despite the target server supporting better encryption (eg aes256-cts-hmac-sha1-96).

Reversible One-Way Hash

Samba SMB mount buffer overflow XEC (fixed macOS 11.7.3/13.2/12.6.3)
CVE-2023-23513 9.8 - Critical - February 27, 2023

A buffer overflow issue was addressed with improved memory handling. This issue is fixed in macOS Big Sur 11.7.3, macOS Ventura 13.2, macOS Monterey 12.6.3. Mounting a maliciously crafted Samba network share may lead to arbitrary code execution.

Classic Buffer Overflow

Samba LDAP Auth Info Leak Reveals Deleted Object Names
CVE-2018-14628 4.3 - Medium - January 17, 2023

An information leak vulnerability was discovered in Samba's LDAP server. Due to missing access control checks, an authenticated but unprivileged attacker could discover the names and preserved attributes of deleted objects in the LDAP store.

AuthZ

Samba smbd Symlink Follow CVE-2022-3592
CVE-2022-3592 6.5 - Medium - January 12, 2023

A symlink following vulnerability was found in Samba, where a user can create a symbolic link that will make 'smbd' escape the configured share path. This flaw allows a remote user with access to the exported part of the file system under a share via SMB1 unix extensions or NFS to create symlinks to files outside the 'smbd' configured share path and gain access to another restricted server's filesystem.

insecure temporary file

Samba Heimdal GSSAPI unwrapdes Buffer Overflow
CVE-2022-3437 6.5 - Medium - January 12, 2023

A heap-based buffer overflow vulnerability was found in Samba within the GSSAPI unwrap_des() and unwrap_des3() routines of Heimdal. The DES and Triple-DES decryption routines in the Heimdal GSSAPI library allow a length-limited write buffer overflow on malloc() allocated memory when presented with a maliciously small packet. This flaw allows a remote user to send specially crafted malicious data to the application, possibly resulting in a denial of service (DoS) attack.

Heap-based Buffer Overflow

MIT Kerberos <1.20.1: PAC parse int ovf -> RCE
CVE-2022-42898 8.8 - High - December 25, 2022

PAC parsing in MIT Kerberos 5 (aka krb5) before 1.19.4 and 1.20.x before 1.20.1 has integer overflows that may lead to remote code execution (in KDC, kadmind, or a GSS or Kerberos application server) on 32-bit platforms (which have a resultant heap-based buffer overflow), and cause a denial of service on other platforms. This occurs in krb5_pac_parse in lib/krb5/krb/pac.c. Heimdal before 7.7.1 has "a similar bug."

Integer Overflow or Wraparound

Heimdal <7.7.1: Remote Code Exec via ASN.1 Invalid Free in KDC
CVE-2022-44640 9.8 - Critical - December 25, 2022

Heimdal before 7.7.1 allows remote attackers to execute arbitrary code because of an invalid free in the ASN.1 codec used by the Key Distribution Center (KDC).

Microsoft Netlogon RPC Elevation of Privilege (CVE-2022-38023)
CVE-2022-38023 8.1 - High - November 09, 2022

Netlogon RPC Elevation of Privilege Vulnerability

Windows Kerberos EoP Vulnerability
CVE-2022-37967 7.2 - High - November 09, 2022

Windows Kerberos Elevation of Privilege Vulnerability

Microsoft Windows Kerberos RC4-HMAC EOP Vulnerability
CVE-2022-37966 8.1 - High - November 09, 2022

Windows Kerberos RC4-HMAC Elevation of Privilege Vulnerability

Samba GnuTLS RNG fail: Predictable values lead to privilege escalation
CVE-2022-1615 5.5 - Medium - September 01, 2022

In Samba, GnuTLS gnutls_rnd() can fail and give predictable random values.

Use of Insufficiently Random Values

Samba dNSHostName Write via Missing Validated-DNS-Host-Name Right
CVE-2022-32743 7.5 - High - September 01, 2022

Samba does not validate the Validated-DNS-Host-Name right for the dNSHostName attribute which could permit unprivileged users to write it.

Incorrect Default Permissions

Samba AD DC SPN Alias Bypass Enables DoS & Impersonation
CVE-2022-0336 8.8 - High - August 29, 2022

The Samba AD DC includes checks when adding service principals names (SPNs) to an account to ensure that SPNs do not alias with those already in the database. Some of these checks are able to be bypassed if an account modification re-adds an SPN that was previously present on that account, such as one added when a computer is joined to a domain. An attacker who has the ability to write to an account can exploit this to perform a denial-of-service attack by adding an SPN that matches an existing service. Additionally, an attacker who can intercept traffic can impersonate existing services, resulting in a loss of confidentiality and integrity.

Incorrect Default Permissions

SMB1 Write Flaw Allows Server Memory Leakage in Samba
CVE-2022-32742 4.3 - Medium - August 25, 2022

A flaw was found in Samba. Some SMB1 write requests were not correctly range-checked to ensure the client had sent enough data to fulfill the write, allowing server memory contents to be written into the file (or printer) instead of client-supplied data. The client cannot control the area of the server memory written to the file (or printer).

Samba KDC/kpasswd Ticket Decrypt via Shared Account flaw
CVE-2022-2031 8.8 - High - August 25, 2022

A flaw was found in Samba. The security vulnerability occurs when KDC and the kpasswd service share a single account and set of keys, allowing them to decrypt each other's tickets. A user who has been requested to change their password, can exploit this flaw to obtain and use tickets to other services.

authentification

Samba AD LDAP UAF on LDAP Message Value during Privileged Attribute Modify
CVE-2022-32746 5.4 - Medium - August 25, 2022

A flaw was found in the Samba AD LDAP server. The AD DC database audit logging module can access LDAP message values freed by a preceding database module, resulting in a use-after-free issue. This issue is only possible when modifying certain privileged attributes, such as userAccountControl.

Dangling pointer

Samba KDC Accepts Kpasswd Requests With Any Key (Domain Takeover)
CVE-2022-32744 8.8 - High - August 25, 2022

A flaw was found in Samba. The KDC accepts kpasswd requests encrypted with any key known to it. By encrypting forged kpasswd requests with its own key, a user can change other users' passwords, enabling full domain takeover.

Authentication Bypass by Spoofing

Samba LDAP Add/Modify Leads to Uninitialized Data Read (CVE-2022-32745)
CVE-2022-32745 8.1 - High - August 25, 2022

A flaw was found in Samba. Samba AD users can cause the server to access uninitialized data with an LDAP add or modify the request, usually resulting in a segmentation fault.

Out-of-bounds Read

Samba AD DC LDAP MaxQueryDuration bypass
CVE-2021-3670 6.5 - Medium - August 23, 2022

MaxQueryDuration not honoured in Samba AD DC LDAP

Samba Auth Metadata Flaw Enables Out-of-Share Modify (CVE-2021-20316)
CVE-2021-20316 - August 23, 2022

A flaw was found in the way Samba handled file/directory metadata. This flaw allows an authenticated attacker with permissions to read or modify share metadata, to perform this operation outside of the share.

Race Condition

Kerberos acceptors need easy access to stable AD identifiers (eg objectSid)
CVE-2020-25721 8.8 - High - March 16, 2022

Kerberos acceptors need easy access to stable AD identifiers (eg objectSid). Samba as an AD DC now provides a way for Linux applications to obtain a reliable SID (and samAccountName) in issued tickets.

Improper Input Validation

A flaw was found in the way samba implemented DCE/RPC
CVE-2021-23192 7.5 - High - March 02, 2022

A flaw was found in the way samba implemented DCE/RPC. If a client to a Samba server sent a very large DCE/RPC request, and chose to fragment it, an attacker could replace later fragments with their own data, bypassing the signature requirements.

In DCE/RPC it is possible to share the handles (cookies for resource state) between multiple connections
CVE-2021-3738 8.8 - High - March 02, 2022

In DCE/RPC it is possible to share the handles (cookies for resource state) between multiple connections via a mechanism called 'association groups'. These handles can reference connections to our sam.ldb database. However while the database was correctly shared, the user credentials state was only pointed at, and when one connection within that association group ended, the database would be left pointing at an invalid 'struct session_info'. The most likely outcome here is a crash, but it is possible that the use-after-free could instead allow different user state to be pointed at and this might allow more privileged access.

Dangling pointer

All versions of Samba prior to 4.15.5 are vulnerable to a malicious client using a server symlink to determine if a file or directory exists in an area of the server file system not exported under the share definition
CVE-2021-44141 4.3 - Medium - February 21, 2022

All versions of Samba prior to 4.15.5 are vulnerable to a malicious client using a server symlink to determine if a file or directory exists in an area of the server file system not exported under the share definition. SMB1 with unix extensions has to be enabled in order for this attack to succeed.

insecure temporary file

The Samba vfs_fruit module uses extended file attributes (EA, xattr) to provide "
CVE-2021-44142 8.8 - High - February 21, 2022

The Samba vfs_fruit module uses extended file attributes (EA, xattr) to provide "...enhanced compatibility with Apple SMB clients and interoperability with a Netatalk 3 AFP fileserver." Samba versions prior to 4.13.17, 4.14.12 and 4.15.5 with vfs_fruit configured allow out-of-bounds heap read and write via specially crafted extended file attributes. A remote attacker with write access to extended file attributes can execute arbitrary code with the privileges of smbd, typically root.

Out-of-bounds Read

A flaw was found in the way Samba, as an Active Directory Domain Controller, implemented Kerberos name-based authentication
CVE-2020-25719 7.2 - High - February 18, 2022

A flaw was found in the way Samba, as an Active Directory Domain Controller, implemented Kerberos name-based authentication. The Samba AD DC, could become confused about the user a ticket represents if it did not strictly require a Kerberos PAC and always use the SIDs found within. The result could include total domain compromise.

Race Condition

A flaw was found in the way samba, as an Active Directory Domain Controller, is able to support an RODC (read-only domain controller)
CVE-2020-25718 8.8 - High - February 18, 2022

A flaw was found in the way samba, as an Active Directory Domain Controller, is able to support an RODC (read-only domain controller). This would allow an RODC to print administrator tickets.

AuthZ

A flaw was found in the way Samba maps domain users to local users
CVE-2020-25717 8.1 - High - February 18, 2022

A flaw was found in the way Samba maps domain users to local users. An authenticated attacker could use this flaw to cause possible privilege escalation.

Improper Input Validation

Multiple flaws were found in the way samba AD DC implemented access and conformance checking of stored data
CVE-2020-25722 8.8 - High - February 18, 2022

Multiple flaws were found in the way samba AD DC implemented access and conformance checking of stored data. An attacker could use this flaw to cause total domain compromise.

AuthZ

A flaw was found in the way samba implemented SMB1 authentication
CVE-2016-2124 5.9 - Medium - February 18, 2022

A flaw was found in the way samba implemented SMB1 authentication. An attacker could use this flaw to retrieve the plaintext password sent over the wire even if Kerberos authentication was required.

authentification

Stay on top of Security Vulnerabilities

Want an email whenever new vulnerabilities are published for Samba or by Samba? Click the Watch button to subscribe.

Samba
Vendor

Samba
Product

subscribe