CVE-2023-3961 is a path traversal in Samba 4.16.0 and later: smbd did not strip ../ from SMB pipe names, so a client could make it connect as root to any unix domain socket on the device. Samba fixed it in 4.17.12, 4.18.8 and 4.19.1 on 2023-10-10, and QNAP fixed QTS and QuTS hero 5.1.x in build 5.1.3.2578.
Vulnerability summary
CVSS base score
9.8
Critical severity
EPSS score (FIRST)
2.7%
Probability of exploitation in the wild in the next 30 days
CISA KEV catalog
No
Not listed
Published
Vulnerability ID: CVE-2023-3961 · Source: NVD
Affected components
| Component | CPE | Version range |
|---|---|---|
| Samba (smbd) | cpe:2.3:a:samba:samba:*:*:*:*:*:*:*:* | 4.16.0 and later before 4.17.12, 4.18.0 up to 4.18.8 and 4.19.0 (fixed in 4.17.12, 4.18.8 and 4.19.1, released 2023-10-10); releases before 4.16.0 lack the vulnerable code |
| QNAP QTS 5.1.x | — | QTS 5.1.x before 5.1.3.2578 build 20231110 (per QNAP QSA-23-20) |
| QNAP QuTS hero h5.1.x | — | QuTS hero h5.1.x before h5.1.3.2578 build 20231110 (per QNAP QSA-23-20) |
What does this mean for affected devices?
CVE-2023-3961 is a path traversal (CWE-22) in how smbd connects SMB named pipes to local services. Samba's announcement explains that since 4.16.0 smbd connects client pipe names opened through the IPC$ share to unix domain sockets in a private directory, normally to reach RPC services such as SAMR, LSA or SPOOLSS, but did not sanitize names containing ../. Because smbd connects as root, a client could reach a service listening on any unix domain socket on the file system without file-system permissions restricting it, with possible denial of service, crashes or compromise depending on that service. Samba lists no workaround and said no exploit was known at publication. The fix shipped in 4.17.12, 4.18.8 and 4.19.1, tracked as Samba bug 15422.
The scores disagree widely. Samba rates it 6.8 (AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:N), Red Hat 9.1 as the CNA score recorded in NVD, and NVD's Primary score is 9.8 with vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (NVD). NVD's CPE data also has no lower bound: it flags every Samba version before 4.17.12, while Samba says only releases from 4.16.0 contain the bug. The Debian tracker agrees with Samba, marking buster and bullseye not affected because the vulnerable code is absent, and fixes bookworm in 2:4.17.12+dfsg-0+deb12u1 (DSA-5525-1). A scanner that matches NVD ranges will therefore report this CVE on Samba 4.15 and older builds that Samba and Debian treat as not affected, a case to record as "not affected" in a VEX statement, as our CSAF and VEX for device makers guide shows.
NAS firmware on a current Samba is the device case. QNAP's QSA-23-20, released on 2023-12-09, covers this CVE together with the four other CVEs of the same Samba security release, rates the set Moderate, and fixes QTS 5.1.x in 5.1.3.2578 build 20231110 and QuTS hero h5.1.x in h5.1.3.2578 build 20231110. On any device, the risk depends on which local daemons expose unix domain sockets, since each becomes reachable over SMB as root. Our Samba vulnerabilities in embedded firmware guide shows how to find the Samba version and the listening interfaces in an image, and our path traversal fix guide covers the same class of bug in vendor code.
This CVE is not in the CISA KEV catalog as of 2026-11-16 (catalog version 2026.11.13, CISA KEV), and FIRST EPSS gives it 0.027, the 86th percentile, in its 2026-11-15 dataset (FIRST EPSS). For device makers the fix is a Samba release at or above 4.17.12, 4.18.8 or 4.19.1 on 4.16 and later trees, or a backport of Samba's patch; because there is no configuration workaround, limit smbd to trusted interfaces and keep ports 139 and 445 off the WAN until the update ships.
Evidence
- Since 4.16.0 smbd connects pipe names to unix sockets in a private directory without sanitizing ../; connects as root; no workaround; no known exploits; Samba CVSS 6.8; fixed in 4.19.1, 4.18.8, 4.17.12. — Samba security announcement
- NVD CVSS v3.1 9.8 (Primary), Red Hat 9.1 (Secondary), CWE-22; CPE range before 4.17.12 with no lower bound. — NVD
- Red Hat CVE page for CVE-2023-3961. — Red Hat
- Buster and bullseye not affected (vulnerable code not present); bookworm fixed 2:4.17.12+dfsg-0+deb12u1 (DSA-5525-1). — Debian Security Tracker
- QSA-23-20 released 2023-12-09 covers CVE-2023-4154, -42669, -4091, -3961, -42670; Moderate; QTS 5.1.3.2578 build 20231110 and QuTS hero h5.1.3.2578 build 20231110 fix. — QNAP QSA-23-20
- Not in the CISA KEV catalog as of 2026-11-16 (catalog version 2026.11.13). — CISA KEV
- EPSS 0.02688 (86.1st percentile), dataset 2026-11-15, read 2026-11-16. — FIRST EPSS

Related advisories
Sources
Frequently asked questions
Is Samba 4.15 or older affected by CVE-2023-3961?
No. Samba says the bug exists in all versions starting with 4.16.0, and the Debian tracker marks buster and bullseye not affected because the vulnerable code is absent. NVD's CPE range has no lower bound, so version-matching scanners can still flag older builds (per Samba, Debian and NVD).
Which NAS firmware is affected by CVE-2023-3961?
QNAP QSA-23-20 lists QTS 5.1.x and QuTS hero h5.1.x, fixed in 5.1.3.2578 build 20231110 and h5.1.3.2578 build 20231110. Other devices are affected when they ship Samba 4.16.0 or later below 4.17.12, 4.18.8 or 4.19.1 without Samba's patch (per QNAP and Samba).
Why do CVSS scores for CVE-2023-3961 range from 6.8 to 9.8?
Samba scores 6.8 with high attack complexity and integrity impact only, Red Hat's CNA score is 9.1, and NVD 9.8 assuming full confidentiality, integrity and availability impact. The real impact depends on which unix-socket services run on the device (per Samba, Red Hat and NVD).
Is there a workaround for CVE-2023-3961?
No. Samba lists no workaround, so the fix is 4.17.12, 4.18.8, 4.19.1 or a backport. Until then, limit smbd to trusted interfaces and block ports 139 and 445 on the WAN. It is not in the CISA KEV catalog as of 2026-11-16 (per Samba and CISA KEV).
Questions about this page?