
CVE-2026-4480
Remote Code Execution (RCE)
Samba Print Command Injection Vulnerability
"A single print job name should never become a shell command."
CVE-2026-4480 is a critical command injection vulnerability affecting Samba's printing subsystem.
Under specific configurations, Samba may pass a user-controlled print job name (%J) into a shell command without sufficient sanitization, potentially allowing an attacker to execute arbitrary commands on the affected server.
The issue occurs when Samba is configured with a custom printing command similar to:
print command = lp -t %J %s
The %J parameter expands to the print job name supplied by a client.
If this value reaches a shell interpreter without proper escaping or validation, special characters may alter command execution behavior.
Successful exploitation may allow an attacker to:
| Branch | Vulnerable Before |
|---|---|
| 4.22.x | < 4.22.10 |
| 4.23.x | < 4.23.8 |
| 4.24.x | < 4.24.3 |
Samba 4.22.10
Samba 4.23.8
Samba 4.24.3
and newer releases
+ Upgrade Samba immediately
+ Review all print command configurations
+ Restrict access to shared printers
+ Disable unnecessary printing services
+ Monitor logs for suspicious print job names
Check for custom print commands:
grep -Ri "print command" /etc/samba/
Review results for usage of:
%J
inside shell-executed commands.
Attacker
│
▼
Submit Print Job
│
▼
User-Controlled Job Name (%J)
│
▼
Shell Command Execution
│
▼
Remote Code Execution
This repository is provided for:
No exploit code or offensive tooling is included.
⭐ If this repository helped your research, consider giving it a star.
| Field | Value |
|---|
| CVE ID | CVE-2026-4480 |
| Severity | 🔴 Critical |
| CVSS Score | 10.0 |
| CWE | CWE-78 |
| Type | OS Command Injection |
| Impact | Remote Code Execution |
| Affected Product | Samba |
| Disclosure Year | 2026 |
| Category | Value |
|---|
| CWE | 78 |
| Attack Vector | Network |
| Privileges Required | Low / Configuration Dependent |
| User Interaction | None |
| Confidentiality Impact | High |
| Integrity Impact | High |
| Availability Impact | High |