CVE-2026-4480: Samba print server command injection via %J in "print command"

Critical 9.0 EPSS 13.9%

Samba passes the client-controlled print job description to the smb.conf "print command" through the %J substitution without escaping shell metacharacters, so a remote client can run commands on the server. Print servers are exposed when "print command" contains %J and printing is not set to cups or iprint; guests may print by default, so no account is needed. Samba scores it CVSS 10.0. All Samba versions are affected; the same release also fixes a similar %u injection in "check password script" (CVE-2026-4408).

What do these terms mean? CVE · CVSS score · exploited (KEV) · EPSS · backported fix · all terms

What to do now

  1. Check whether you run the affected software and which version (commands below).
  2. Install the fixed version for your system: see “Patch it” below.
  3. Restart smbd (and nmbd/winbind if used): systemctl restart smbd on Debian/Ubuntu, systemctl restart smb on RHEL/SUSE.
  4. If you cannot patch today, apply the temporary mitigation below and patch as soon as possible.

Affected and fixed versions

Affected:

Fixed in:

Am I affected?

smbd --version
testparm -s 2>/dev/null | grep -iE '^\s*(printing|print command)\s*='
testparm -s 2>/dev/null | grep -i '%J'

Patch it

Use the commands for your system. Distribution packages often keep an older version number with the fix backported, so compare with the fixed package versions in the table below, not only with the upstream version.

Debian
sudo apt update
sudo apt install --only-upgrade samba samba-common-bin samba-libs
sudo systemctl restart smbd nmbd
Ubuntu
sudo apt update
sudo apt install --only-upgrade samba samba-common-bin samba-libs
sudo systemctl restart smbd nmbd
RHEL, AlmaLinux, Rocky, Oracle
sudo dnf upgrade --refresh 'samba*'
sudo systemctl restart smb nmb
SUSE / openSUSE
sudo zypper refresh
sudo zypper update samba samba-client
sudo systemctl restart smb nmb
Built from source
Upgrade to Samba 4.24.3, 4.23.8 or 4.22.10 (or apply the patches from https://www.samba.org/samba/security/) and restart the Samba daemons.

General update steps for every system are on the Linux and Unix & BSD pages; after updating, see which services to restart.

Fix status in Linux distributions

ReleasePackageStatusFixed version / advisory
Debian 12sambafixed2:4.17.12+dfsg-0+deb12u4
Debian 13sambafixed2:4.22.8+dfsg-0+deb13u2
Debian testingsambafixed2:4.24.3+dfsg-1
Red Hat Enterprise Linux 9samba-0:4.23.5-10.el9_8fixedRHSA-2026:25049
Red Hat Enterprise Linux 8samba-0:4.19.4-16.el8_10fixedRHSA-2026:22644
Red Hat Enterprise Linux 6sambaout of support scope
Red Hat Enterprise Linux 6samba4out of support scope
Red Hat Enterprise Linux 10samba-0:4.23.5-109.el10_2fixedRHSA-2026:22963
Debian 13 (trixie)sambafixed2:4.22.8+dfsg-0+deb13u2 (DSA-6297-1)
Debian 12 (bookworm)sambafixed2:4.17.12+dfsg-0+deb12u4 (DSA-6297-1)
Ubuntu 26.04 LTS (resolute)sambafixed2:4.23.6+dfsg-1ubuntu2.1 (USN-8306-1)
Ubuntu 24.04 LTS (noble)sambafixed2:4.19.5+dfsg-4ubuntu9.6 (USN-8306-1)
Ubuntu 22.04 LTS (jammy)sambafixed2:4.15.13+dfsg-0ubuntu1.12 (USN-8306-1)
RHEL 10sambafixed4.23.5-109.el10_2 (RHSA-2026:22963)
RHEL 9sambafixed4.23.5-10.el9_8 (RHSA-2026:25049)
RHEL 8sambafixed4.19.4-16.el8_10 (RHSA-2026:22644)
SUSE Linux Enterprise Server 16.0sambafixed4.22.11+git.552.66cfeb7de0a-160000.1.1
SUSE Linux Enterprise Server 15 SP7sambafixed4.21.10+git.501.277ba349a01-150700.3.26.1
openSUSE Leap 15.6sambafixed4.19.8+git.473.51d12fd320c-150600.3.26.1

From the Debian security tracker, Ubuntu CVE tracker and Red Hat Security Data API, refreshed every few hours.

If you cannot patch yet

Related vulnerabilities

Sources

Page generated automatically from official sources on 2026-11-03 18:05 UTC and reviewed by an editor. Always confirm with your vendor's advisory.