id: CVE-2026-4480 info: name: Samba Printing Subsystem - Remote Code Execution author: projectdiscovery severity: critical 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. impact: | Successful exploitation allows an unauthenticated remote attacker to execute arbitrary operating system commands on the Samba server, leading to full system compromise including data exfiltration, malware deployment, and lateral movement within the network. remediation: | Upgrade Samba to version 4.22.10, 4.23.8, or 4.24.3 or later, or as a workaround add single quotes directly around %J in the print command smb.conf entry or remove %J completely from the configuration. reference: - https://github.com/Vusal777/CVE-2026-4480-exploit-poc - https://www.samba.org/samba/security/CVE-2026-4480.html - https://nvd.nist.gov/vuln/detail/CVE-2026-4480 classification: cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H cvss-score: 9.8 cve-id: CVE-2026-4480 epss-score: 0.1393 epss-percentile: 0.96146 cwe-id: CWE-78 metadata: max-request: 1 vendor: samba product: samba shodan-query: "port:445 product:Samba" fofa-query: "protocol=smb && banner=Samba" tags: cve,cve2026,samba,rce,smb,printing,passive,vkev javascript: - pre-condition: | isPortOpen(Host,Port); code: | let m = require("nuclei/smb"); let c = new m.SMBClient(); let response = c.ConnectSMBInfoMode(Host, Port); to_json(response); args: Host: "{{Host}}" Port: "445" matchers-condition: and matchers: - type: word words: - "Samba" - type: dsl dsl: - "compare_versions(version, '< 4.22.10') || compare_versions(version, '>= 4.23.0', '< 4.23.8') || compare_versions(version, '>= 4.24.0', '< 4.24.3')" extractors: - type: regex name: version group: 1 regex: - "Samba ([0-9]+\\.[0-9]+\\.[0-9]+[a-z]*)" # digest: 4b0a004830460221009d4003a523c4b93fb856e3a9f385d2abe4446dfdc817e9d332e15cec74abd8e4022100c37a0c8f6135d6e9159c009dc1474fab9a45551f98bf764cb6843054264dbab0:922c64590222798bb761d5b6d8e72950