Hard Web & API Security +700 XP

PHP2Shell: Exploit PHP's Upload-Progress Memory Leak (CVE-2026-109618)

Reproduce the real PHP2Shell attack (CVE-2026-109618) against a self-hosted PHP storefront. Abuse PHP's session upload-progress memory disclosure to read a live operator session straight out of the web worker's memory, hijack the Ops Console, and escalate to remote code execution and root. Hands-on in the Attack Terminal with curl.

67% solve it 3 hackers played 2 flags Updated Nov 01, 2026 First blood Malekith
PHP2ShellCVE-2026-109618Memory DisclosureInformation Disclosuresession.upload_progressSession Hijacking
Start Your Challenge
  1. 1Create a free account, then click "Start Lab"You'll get your own private machine with an IP address
  2. 2Explore the targetOpen the IP in your browser and look for vulnerabilities
  3. 3Find and submit flagsFlags are secret text strings hidden in the system - paste them below to score
  • ~1-2 min setup
  • Private instance
  • 30 min per session. Restart it for free, as often as you like.

What is PHP2Shell?

PHP2Shell is the name given to two critical PHP vulnerabilities, CVE-2026-109618 and CVE-2026-109619, disclosed in October 2026 by researchers at Calif together with OpenAI and Wiz. PHP runs a large share of the web, so the flaws affected an enormous number of servers. At their core is a memory disclosure: under the right request, a PHP web worker hands back bytes of its own memory to an anonymous attacker. That memory can contain data from other visitors' requests - session tokens, API keys, even private keys. The web-facing fix shipped in PHP 8.2.35, 8.3.36, 8.4.27 and 8.5.12.

How this lab works

You are looking at Kartline, a self-hosted PHP storefront running a build of PHP from just before the PHP2Shell patch. Its product-review feature uses PHP's session.upload_progress to drive a live progress bar - exactly the surface the memory disclosure abuses. Working entirely from the Attack Terminal with curl, you will read a live store operator's session straight out of the web worker's memory, replay it to take over the Ops Console, turn an operator-only tool into remote code execution for the user flag, then escalate to root. Nothing is simulated away: the target runs the genuinely vulnerable PHP.

Why practice memory disclosure and session hijacking?

Memory-disclosure bugs are among the most dangerous classes in security - Heartbleed, in 2014, leaked private keys from OpenSSL the same way. A single unauthenticated request that returns server memory can quietly hand an attacker the exact secrets they need to log in as someone else. Reproducing the full chain on HackerDNA builds the instinct to spot a dangerous upload feature, recognize a vulnerable runtime by its version, and understand why keeping PHP patched and running services with least privilege actually matters.

What You Will Learn

  • Fingerprint a PHP server and recognize a version vulnerable to PHP2Shell
  • Identify PHP's session.upload_progress attack surface in a file-upload feature
  • Exploit the PHP2Shell memory disclosure to leak live session data from worker memory
  • Hijack an authenticated operator session by replaying a stolen PHP session id
  • Turn an operator-only template feature into remote code execution
  • Escalate privileges through a sudo misconfiguration to capture the root flag
  • Explain why upgrading to the patched PHP release closes the hole

Prerequisites

HTTP basics curl command line multipart/form-data uploads PHP sessions and cookies Linux command line