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/prnjlksingh/php-cve-2026-115560-demo
Vulnerability AnalysisExploitationWeb Application ExploitationWeb SecurityLearning & EducationPayload DevelopmentLabs & Practice
GitHub
prnjlksingh/php-cve-2026-115560-demo

php-cve-2026-115560-demo

Local intentionally vulnerable PHP lab demonstrating CVE-2026-115560: session serialize_handler mismatch leading to unserialize() gadget RCE, with a PoC client and interactive shell.

View Repository
2328 days agoNot yet reviewed
Share

CVE-2026-115560 POC

https://github.com/user-attachments/assets/5a39e859-3606-4a42-8e9f-03ca118b1934

A local, intentionally vulnerable PHP app that demonstrates the likely primitive behind CVE-2026-115560: session upload-progress data written with one serializer is later decoded with another after a runtime session.serialize_handler switch. Attacker-controlled bytes reach unserialize(), instantiate a gadget, and execute a shell command.

The public face is NimbusDrive, a generic file-delivery / upload portal. The visible pages have no CVE or RCE branding. This is a local lab: the server binds to 127.0.0.1:8099, and the gadget writes proof to var/log/php/rce-output.txt. Do not expose it or point it at systems you do not own.

Layout

The project intentionally mirrors a small production web-server tree:

router.php                         clean-URL/static router for the built-in server
run.sh                             lab launcher (127.0.0.1:8099)
poc.sh                             CLI exploit client and interactive shell
var/www/html/                      public docroot
  index.php                        home page + vulnerable text endpoint
  about.php  pricing.php  docs.php status.php support.php legal.php
  security.php  changelog.php  login.php  signup.php  404.php
  api/health.php  api/version.php  api/status.php
  assets/css  assets/js  assets/img  downloads/  .well-known/
var/www/app/                       application code outside the docroot
  bootstrap.php                    vulnerable session bootstrap + DemoGadget
  config.php  functions.php  layout.php  upload.php
var/lib/php/sessions/              PHP session files
var/lib/php/configured_handler     base serializer selected by run.sh
var/lib/php/nd-cmd.sh              transient helper written by poc.sh
var/lib/nimbusdrive/uploads/       uploaded file storage
var/log/php/error.log              PHP error log
var/log/php/rce-output.txt         command/output proof
etc/php/8.4/cli/php.ini            CLI/built-in-server config
etc/php/8.4/fpm/                   mirrored FPM config and pool
etc/nginx/  etc/apache2/           mirrored reverse-proxy/site configs
etc/systemd/system/                local lab unit
etc/logrotate.d/  etc/cron.d/      mirrored housekeeping
opt/nimbusdrive/  usr/local/bin/   helper scripts from the fake deployment
var/backups/  var/run/  var/spool/  var/tmp/  runtime tree

var/ is a sandboxed mirror, not the host's real /var. run.sh points PHP at the local mirror.

The three advisory conditions

The app is vulnerable when all of these are true:

  1. PHP is configured with session.serialize_handler=php_binary or php_serialize.
  2. The application calls ini_set('session.serialize_handler', 'php') before session_start().
  3. session.upload_progress.enabled=1.

run.sh supplies the first and third conditions; var/www/app/bootstrap.php performs the second.

Run

cd php-cve-2026-115560-demo
chmod +x run.sh poc.sh
./run.sh php_binary        # or: ./run.sh php_serialize

The launcher prints the PHP version, the user/home used by the lab, the docroot/app/router paths, the active serializer, and the site/API routes. It then starts PHP's built-in server behind router.php on 127.0.0.1:8099.

In another terminal:

./poc.sh              # interactive shell (when run in a terminal)
./poc.sh -i           # force interactive mode
./poc.sh 'whoami'     # run one command and exit
CMD='printf RCE' ./poc.sh

In non-interactive/piped use, ./poc.sh with no arguments still runs id.

The site at http://127.0.0.1:8099/ is a generic product site with working pages, static assets, upload UI, status page, docs, downloads, and JSON APIs. After a successful request, the home page shows a collapsed Developer diagnostics section with the last command and output.

Interactive shell

The shell keeps its own current directory and prints only command output. The prompt shows the target process user and the full remote working directory, so pwd/whoami context is visible at a glance. The client probes the target with ?format=text&probe=user; it does not assume the client user is the server user.

 php2shell2HELL > kali@nimbusdrive:/home/kali/newlinuxlingling/php-cve-2026-115560-demo
php2shell2HELL> pwd
/home/kali/newlinuxlingling/php-cve-2026-115560-demo
php2shell2HELL> whoami
kali
php2shell2HELL> cd /tmp
php2shell2HELL> pwd
/tmp
php2shell2HELL> cd
php2shell2HELL> pwd
/home/kali/newlinuxlingling/php-cve-2026-115560-demo
php2shell2HELL> exit

Shell built-ins: cd, pwd, clear, help, exit, quit. Use exit, quit, or Ctrl-D to leave. cd with no argument (or ~) returns to the lab home, which is the project root. pwd prints the full path; whoami is executed by the target, so it reports the user the server is actually running as.

The server runs as the user who started ./run.sh (normally kali). The included etc/systemd/system/nimbusdrive.service is configured for the same local user and project path. If whoami returns www-data, the target is not using ./run.sh or is using an older installed unit or PHP-FPM pool that runs as www-data; poc.sh now shows the actual target user and prints a mismatch warning. For the local lab, start it with ./run.sh instead. If you installed an older unit, copy the updated unit again and run:

sudo systemctl daemon-reload
sudo systemctl restart nimbusdrive

The identity probe is a lab-only diagnostics path:

/?format=text&probe=user     process user used by the prompt probe

Single-command mode prints only the command output:

$ ./poc.sh 'whoami'
kali

Set VERBOSE=1 to see the target, handler, current directory, real command, payload, and raw response on stderr.

Site routes and APIs

/                 home + upload center
/about            product/about page
/pricing          plans
/docs             documentation
/status           service status page
/support          support/contact
/legal            terms and privacy
/security         security overview
/changelog        release notes
/login  /signup   account pages
/api/health       JSON health check
/api/version      JSON version/build metadata
/api/status       JSON service status
/robots.txt  /sitemap.xml  /.well-known/security.txt
/assets/*  /downloads/*  /favicon.svg

Unknown paths render the custom 404 page. Static files are served directly by the built-in server; router.php handles clean URLs and always anchors the request working directory to the project root. The vulnerable bootstrap also does this, so command execution reports the full lab path even if a mirrored server config is used.

Why it works

PHP's upload-progress handler runs before the application script. It writes the progress entry using the server-configured serializer (php_binary or php_serialize).

The application then switches the serializer to php and calls session_start(). The php format uses key|serialized-value, so the decoder splits on the first | it finds. The progress key is upload_progress_<attacker value>, so an attacker can put a | into that value and place a serialized object after it:

x|O:10:"DemoGadget":2:{s:3:"msg";s:5:"hello";s:3:"cmd";s:2:"id";}

The php decoder passes the suffix to unserialize(). The trailing progress array is ignored as extra data. DemoGadget::__wakeup() then runs and executes its cmd property.

The | is also what makes the malformed file decodable at all; without it the php decoder rejects the php_binary/php_serialize file and destroys the session.

Length note

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.

    1.1k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

    594
  • 3

    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.

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

    322
  • 5

    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.

    308
  • 6

    redforge

    cybersecurity91/redforge

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

    275

Explore all tools

Browse our collection of tools

View all tools →