Skip to content
KitploitKITPLOIT
도구익스플로잇블로그
Log in
제출
도구익스플로잇블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

피드문의개인정보© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
CVE-2026-109619 — Proof-of-concept exploit and Docker Compose lab for CVE-2026-109619, a PHP stale session global-state RCE, with heap/ASLR leak stages and a patched-build comparison. | Kitploit
도구/GitHubGitHub/morphingyu/cve-2026-109619
Container SecurityMemory ForensicsVulnerability AnalysisExploitationWeb Application ExploitationLabs & Practice
GitHubmorphingyu/cve-2026-109619

CVE-2026-109619

Proof-of-concept exploit and Docker Compose lab for CVE-2026-109619, a PHP stale session global-state RCE, with heap/ASLR leak stages and a patched-build comparison.

저장소 보기
1개월 전아직 검토되지 않음
공유
요청한 언어로 콘텐츠를 사용할 수 없습니다. 영어 버전을 표시합니다.

CVE-2026-109619 — PHP stale session global state → RCE

A working proof of concept for CVE-2026-109619 / GHSA-6wmf-4rv5-p3rp ("RCE via stale global state"), plus a local Docker Compose lab:

ServiceImageResult
vulnPHP 8.4.26 + Apache prefork/mod_phpremote code execution as www-data
fixedPHP 8.4.27 (security release)no code execution
attackerPython 3.12runs the exploit against the vulnerable target and prints the id and whoami proof

The vulnerable page is just <?php echo "OK\n"; ?>. It never calls session_start(): the bug is reached by PHP's session.upload_progress handler before request initialization.

Advisory: https://github.com/php/php-src/security/advisories/GHSA-6wmf-4rv5-p3rp Fixed in 8.2.35 / 8.3.36 / 8.4.27 / 8.5.12 (fix commit 31c0ea7d7f, "Avoid state corruption via bailout").


Quick start

cd cve-2026-109619
./run_poc.sh

Expected tail of the output:

[+] Zend MM chunk base = 0x...
[+] libphp base = 0x...
[*] stage 3: HTDATA=0x... zif_system=0x...
[+] executed on attempt 1
PROOF: uid=33(www-data) gid=33(www-data) groups=33(www-data)
WHOAMI: www-data

The command executed by the exploit reads a script from the shared volume. That script runs id and whoami, writes both results to the shared proof-vuln volume, and the attacker reads the result. The proof lines are read from the file; the sample account name and numeric IDs above are not hard-coded. On success, the PoC stops after the WHOAMI: line.

run_poc.sh starts only the vulnerable target, hides Docker Compose's setup and shutdown messages, and stops the lab after the result. The Compose network is internal and no host port is published.

The local-only scope applies to run_poc.sh and the Compose lab. Running attacker/exploit.py directly accepts a caller-supplied URL and command via --url and --cmd; use that interface only with systems you are authorised to test.

Troubleshooting

  • cannot overwrite digest sha256:... — old Docker versions can trip over a locally tagged php:8.4.26-apache / php:8.4.27-apache image while composing a digest-pinned service. Remove the tags and retry:

    docker rmi php:8.4.26-apache php:8.4.27-apache
    ./run_poc.sh
    
  • exec format error on an arm64 host — the amd64 QEMU binfmt handler is not registered; see the section below.

Running on arm64 (Apple Silicon, WSL2 on ARM, ...)

The images are pinned to the official linux/amd64 build because the heap calibration and libphp.so offsets were measured there. On an arm64 host, register QEMU binfmt first:

docker run --privileged --rm tonistiigi/binfmt --install amd64
./run_poc.sh

This PoC was developed and verified on an arm64 host with that emulation.


The bug

PHP keeps a lot of worker-global state that points into the request heap. Normally each request resets it. Two things can go wrong:

  1. Producer. session.upload_progress makes PHP initialize the session from the multipart callback before RINIT (inside php_hash_environment()). If a memory_limit OOM bails out of php_session_initialize(), the request is torn down with PG(modules_activated) = 0, so the session RSHUTDOWN path is skipped. PS(http_session_vars) (a zend_reference*) is left pointing into the request heap. That heap is then freed.

  2. Consumer. The next request on the same worker parses its multipart body, allocating attacker-controlled field buffers, and only then reaches php_session_initialize() → php_session_track_init(). The stale PS(http_session_vars) is dereferenced and destroyed before normal request initialization has replaced it.

The OOM is only the interruption that abandons session initialization (the same bailout class is also fixed by the related OOM advisory GHSA-w8hw-w9fx-j79w). The vulnerability demonstrated here is the stale session state surviving into the next request and being consumed before normal initialization — CVE-2026-109619.

php_session_track_init() runs zval_ptr_dtor() on the stale reference:

php_session_initialize
  php_session_track_init
    zval_ptr_dtor(PS(http_session_vars))
      zend_reference_destroy(R0)
        zval_ptr_dtor(&ref->val)          # forged IS_ARRAY_EX
          zend_array_destroy(fake HashTable)
            zend_hash_destroy(fake HashTable)
              pDestructor(&bucket->val)   # -> zif_system()

The whole exploit is two kinds of ordinary multipart POSTs. The producer and consumer must hit the same worker (the lab uses one prefork worker). When a worker aborts, the prefork parent forks a replacement that inherits the same address-space layout, which keeps the heap/ASLR leak results valid across stages.

Reconciling with the official fix

The 8.4.27 patch (and the equivalents on 8.2/8.3/8.5) does several things relevant to this path:

  • replaces OOM longjmp() bailouts with delayed/hard OOM handling,
  • resets request globals at shutdown (PG(http_globals), last error, PG(modules_activated)),
  • early-resets session globals at MULTIPART_EVENT_START,
  • runs upload-progress decode in in_rfc1867_update mode with __PHP_Incomplete_Class-only decoding and no user callbacks,
  • removes $_SESSION before the target script runs.

On 8.4.27 the producer no longer publishes and keeps the dangling session reference, so the heap leak stops working and the chain cannot proceed.


Exploit stages

All three stages use the same stale-session primitive.

  1. Zend MM chunk base. The producer OOMs. The consumer reclaims the stale PS(id) with a 79-byte field whose zend_string length field is 0x1000; php_url_encode() then reads past the string and percent-encodes many request-heap pointers into Set-Cookie. The 2 MB-aligned mode is the Zend MM chunk base.

  2. libphp base. A 56-byte HashTable page is placed at the stale PS(id) so that the cookie data begins at nNextFreeElement | pDestructor. pDestructor is zval_ptr_dtor (libphp+0x65eb60); its address yields the libphp base.

  3. Control flow. A forged 55-byte reference is placed at R0-0x10 (reclaiming the stale zend_reference), and a live 167-byte zend_string (a normal multipart field, kept in $_POST) carries the forged HashTable. pDestructor is zif_system (libphp+0x465370); the forged zend_execute_data next to the bucket passes the command string to it. system() runs the command before the process aborts.

Relevant addresses are all chunk-relative or libphp-relative; ASLR is defeated by the two in-band leaks, not disabled.


Files

cve-2026-109619/
├── run_poc.sh                   # local runner; hides Compose lifecycle output
├── compose.local.yaml           # vulnerable target + attacker only
├── compose.yaml                 # vulnerable + patched + attacker
├── attacker/
│   ├── Dockerfile
│   ├── exploit.py               # exploit implementation (stdlib only)
│   ├── run_demo.sh              # default Compose entry point
│   └── run_local_poc.sh         # id and whoami proof driver
└── target/
    ├── apache.conf              # single prefork worker, KeepAlive Off
    ├── php.ini                  # 8M memory_limit, display_errors On, upload progress On
    └── www/index.php            # <?php echo "OK\n"; ?>

Exploit prerequisites on the target

The lab configuration matches the known reachable case:

도구 다운로드

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 궁극의 OSINT 툴킷: 조사 그래프, 신뢰도 점수 산정, 별칭 패밀리, 지도, 타임라인 및 보고서. 49개 모듈, 400개 이상 사이트, API 키 불필요.

    914
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    # GhostLock 원탭 실행 앱 (CVE-2026-43499)

    909
  • 3

    wifit3

    derv82/wifit3

    Wifite지만 USB 전용 및 크로스 플랫폼.

    686
  • 4

    jumpserver

    jumpserver/jumpserver

    JumpServer는 오픈소스 권한 접근 관리(PAM) 플랫폼으로, DevOps 및 IT 팀이 웹 브라우저를 통해 SSH, RDP, Kubernetes, 데이터베이스 및 RemoteApp 엔드포인트에 주문형 보안 액세스를 제공합니다.

    457
  • 5

    SafeLine

    chaitin/safeline

    악성 HTTP 트래픽을 필터링하고 SQL 인젝션, XSS, 봇 공격을 차단하며, 속도 제한 및 동적 HTML/JS 암호화를 제공하는 자체 호스팅 WAF 및 리버스 프록시입니다.

    405
  • 6

    ARTEX

    baarai/artex

    LLM 멀티 에이전트 자율 침투 테스트 플랫폼으로, 플래너/워커 에이전트, 자산 및 탐색 그래프, MITM 트래픽 기록, 취약점 재테스트 기능을 제공합니다.

    384

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →