CVE-2026-4480
samba: Samba: Remote Code Execution in printing subsystem via unescaped job description
Severity
ImportantRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · May 26, 2026
Updated · September 1, 2026
Description
A flaw was found in the Samba printing subsystem. Samba passes the client-controlled job description string to the command configured with the "print command" setting via the "%J" substitution character without escaping shell meta characters. A remote attacker could exploit this vulnerability by sending a specially crafted print job description that contains unescaped shell characters. This could lead to remote code execution on the affected system.
Statement
The issue affects the Samba printing subsystem. Red Hat has classified this issue as Important severity rather than Critical.
Print servers configured with "printing = cups" or "printing = iprint", and print servers that do not have the "%J" substitution character in the "print command" setting are not affected.
By default, Red Hat Enterprise Linux ships with Samba configured to use CUPS-based printing printing = cups. Hence, although the vulnerable code is present, it is not exploitable in default RHEL configurations.
Because exploitation depends on non-default Samba printing configurations and requires use of the %J substitution parameter within print command, the attack complexity is considered High (AC:H), reducing the likelihood of exploitation in standard deployments.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
Remove "%J" from the "print command" in smb.conf entry.
CVSS / CWE
CVSS 3.1 · 9CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H
CWE-78 · Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')