CVE-2023-3961: Samba: smbd allows client access to unix domain sockets on the file system as root

Published Oct 3, 2023
·
Updated

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.

Other sources

Samba internally connects client pipe names to unix domain sockets within a private directory, allowing clients to connect to services listening on those sockets. However, insufficient sanitization was done on the incoming client pipe names, allowing SMB clients to connect as root to existing unix domain sockets on the file system, meaning if a client could send a pipe name that resolved to an external service using an existing unix domain socket, the client would be able to connect to it without filesystem permissions restricting access.

https://bugzilla.samba.org/showbug.cgi?id=15422

— Red Hat

Affected Software

14 affected componentsFixes available
redhat/samba<4.19.1
4.19.1
redhat/samba<4.18.8
4.18.8
redhat/samba<4.17.12
4.17.12
debian/samba
2:4.17.12+dfsg-0+deb12u42:4.22.11+dfsg-0+deb13u12:4.22.10+dfsg-0+deb13u22:4.25.1+dfsg-1
Samba Samba<4.17.12
Samba Samba>=4.18.0<4.18.8
Samba Samba>=4.19.0<4.19.1
redhat Storage=3.0
redhat Enterprise Linux=8.0
redhat Enterprise Linux Eus=9.0
Fedoraproject Fedora=39
debian/samba<2:4.17.12+dfsg-0+deb12u1
2:4.17.12+dfsg-0+deb12u1
debian/samba<2:4.19.1+dfsg-1
2:4.19.1+dfsg-1
debian/samba<2:4.19.1+dfsg-1
2:4.19.1+dfsg-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade redhat/samba to a version that resolves this vulnerability.

    Fixed in 4.19.1
  2. Upgrade

    Upgrade redhat/samba to a version that resolves this vulnerability.

    Fixed in 4.18.8
  3. Upgrade

    Upgrade redhat/samba to a version that resolves this vulnerability.

    Fixed in 4.17.12
  4. Upgrade

    Upgrade debian/samba to a version that resolves this vulnerability.

    Fixed in 2:4.17.12+dfsg-0+deb12u4Fixed in 2:4.22.11+dfsg-0+deb13u1Fixed in 2:4.22.10+dfsg-0+deb13u2Fixed in 2:4.25.1+dfsg-1
  5. Upgrade

    Upgrade debian/samba to a version that resolves this vulnerability.

    Fixed in 2:4.17.12+dfsg-0+deb12u1
  6. Upgrade

    Upgrade debian/samba to a version that resolves this vulnerability.

    Fixed in 2:4.19.1+dfsg-1

Event History

Oct 3, 2023
Data Sourced
via Red Hat·07:34 AM
DescriptionSeverityAffected Software
Nov 3, 2023
CVE Published
via MITRE·12:32 PM
Data Sourced
via MITRE·12:32 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·01:15 PM
DescriptionSeverityWeaknessAffected Software
Nov 8, 2026
Data Sourced
via OSV·09:47 AM
Affected Software

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

What is CVE-2023-3961?

CVE-2023-3961 is a vulnerability in Samba that allows client access to Unix domain sockets on the file system as root.

2

What is the severity of CVE-2023-3961?

The severity of CVE-2023-3961 is critical with a CVSS score of 9.8.

3

How does CVE-2023-3961 affect Samba?

CVE-2023-3961 affects Samba versions up to and exclusive of 4.19.1, 4.18.8, and 4.17.12.

4

How do I fix CVE-2023-3961 in Samba?

To fix CVE-2023-3961 in Samba, update to version 4.19.1, 4.18.8, or 4.17.12.

5

Are there any references for CVE-2023-3961?

Yes, you can find more information about CVE-2023-3961 at the following references: [Bugzilla - Samba](https://bugzilla.samba.org/show_bug.cgi?id=15422), [Samba Security](https://www.samba.org/samba/security/CVE-2023-3961.html), and [Bugzilla - Red Hat](https://bugzilla.redhat.com/show_bug.cgi/show_bug.cgi?id=2243228).

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203