Two PHP CVEs (CVSS 9.2) give pre-auth RCE via session.upload_progress, hitting PHP 5.4–8.5.11. Fixed in 8.2.35/8.3.36/8.4.27/8.5.12. Can't patch yet? Disable upload_progress. #PHP #security
ikow/php2shell-poc
#5 php2shell-poc: 5 RCE Chains + Detection Rules
CVE-2026-109618/109619 exposed critical pre-auth RCE vectors in PHP via session.upload_progress. This trending repo delivers 5 exploit chains and comprehensive detection rules for Suricata, Sigma, and ModSecurity. Essential for any security team managing PHP environments. Check out the code: github.com/php2shell-poc
GitHub: ikow/php2shell-poc
Part of the Weekly Top 5 GitHub Repos series. Every week, the 5 repos with the most new stars.
#GitHubTrending #GitHub #OpenSource #Dev #WeeklyTop5
1 like · 22 views
Top 5 New GitHub Repos This Week (Ranked by Stars) #Shorts
Top 5 new GitHub repos this week, ranked by stars.
Number 5: php2shell-poc. CVE-2026-109618/109619 5 RCE chains + detection rules (Suricata, Sigma, ModSecurity). PHP... 1,761 stars.
In this Short:
- Number 4: fairplay-decrypt. Offline FairPlay App Store IPA decryption with independent key derivation. 2,003...
- Number 3: REA-Prompts. REAP - Prompts for you to use REA (Reverse Engineer Anything), get the most out of...
- Number 2: gpu-unlock. Unlock FP/BF16 instruction issue rate on Nvidia 3000's cards to their professional...
- Number 1: free-my-tv. A fast, ad-free home screen for Google TV, LG webOS and Samsung Tizen. One button to...
Which one is your #1?
Here are the links:
1. simbasjungles/free-my-tv - simbasjungles/free-my-tv
2. Zagitta/gpu-unlock - Zagitta/gpu-unlock
3. JoasASantos/REA-Prompts - JoasASantos/REA-Prompts
4. EthanArbuckle/fairplay-decrypt - EthanArbuckle/fairplay-decrypt
5. ikow/php2shell-poc - ikow/php2shell-poc
The top new GitHub repos of the week, ranked by stars. A new top 5 every week.
Narrated with an AI clone of the creator's own voice.
#Shorts #GitHub #OpenSource #Top5 #Programming #TechNews
3 likes · 1 comment · 892 views
Here are the links:
1. simbasjungles/free-my-tv - simbasjungles/free-my-tv
2. Zagitta/gpu-unlock - Zagitta/gpu-unlock
3. JoasASantos/REA-Prompts - JoasASantos/REA-Prompts
4. EthanArbuckle/fairplay-decrypt - EthanArbuckle/fairplay-decrypt
5. ikow/php2shell-poc - ikow/php2shell-poc
Which one is your #1?
PHPにおけるSession injectionとLFIのRCEチェーンの観察
最初に
本記事は著者自身が勉強したものを整理したり知識を共有するために記載しています。
用語の説明には本質から逸脱しないよう努めますが、読みやすさの観点からある程度抽象性を持たせています。
そのため正確な情報を約束するものではないのでご了承ください。
php2shellというけれど
脆弱性CVE-2026-109618/CVE-2026-109619、いわゆるphp2shellについて会社がてんやわんやする中、「php2shellの対応で~」なんて言ったり聞いたりすることが多々ありました。
ふと、「脆弱性って2つあるけど、どっちもphp2shellなん?」と思ったので、お勉強。
今回はGitHubで公開されているPoCを通してphp2shellってなんだろうを考え、昔からあるSession injection + LFIのRCEをEDRから覗いてみようかと思います。
注意事項
今回のPoCでは現在話題になっているCVE-2026-109618/CVE-2026-109619は使用しません。
類似の手法を観察しphp2shellとこれら2つの脆弱性の関係を理解します。
php2shellについて
php2shellを理解するために以下のPoCを参考にします。
ikow/php2shell-poc
CVE-2026-109618/CVE-2026-109619の概要
脆弱性
説明
CVE-2026-109618
メモリ不足(OOM)のエラー処理に起因する脆弱性
CVE-2026-109619
不正なリクエスト処理によってUAFが発生する脆弱性
UAF(Use-After-Free)はCTFでちょこちょこ見たので、改めてメモリの中を見ながら解いてみようかなーと思いました。
これらの脆弱性はどちらもRCE(リモートコード実行)につながる脆弱性です。
session.upload_progressを使ったアタックチェーン
PHPにはsession.upload_progressというファイルアップロードの進捗を管理する機能があります。
この機能の悪用とCVE-2026-109618やCVE-2026-109619を組み合わせて行うRCEがphp2shellという手法です。
php2shellはsession.upload_progressの悪用を足がかりとして脆弱性の悪用へとつなぐRCEを実現するためのアタックチェーンと言えます。
補足:CVE-2026-109618、CVE-2026-109619を使用したphp2shellではsession.upload_progressの悪用は数ある足がかりのひとつでしかないことが後から判明しました。
これはsession.upload_progressを無効化することが限定的な対処にしかならないということを示しています。
5つの攻撃チェーン
PoCではsession.upload_progressの悪用からの攻撃チェーンの展開先として5つの手法が紹介されています。
これらはsession.upload_progressの悪用という観点では共通していますが、悪用の方法についても異なっています。
チェーン
概要
内容
A
Session injection + LFI
セッション汚染からのLFI
B
var_destroy UAF → handler overwrite
PHPエンジン内のUAF
C
Handler mismatch → __destruct
PHP-FPM の状態不整合
D
OOM corruption → stale EG()
CVE-2026-109618の利用
E
FPM session OOM → stale BG()
CVE-2026-109619の利用
聞きなれない言葉が並びますが、CVE-2026-109618/CVE-2026-109619を利用したものを含む5つの攻撃チェーンが存在していることがわかります。
チェーンA、B、CにおいてはRCEを実現するための他の条件が存在しますが、D、Eに関しては他の条件が存在しません。
このことから今回発表された脆弱性がいかに重大なものであるかがわかります。
session.upload_progressの悪用等から展開されたRCEチェーンという観点であれば、上記の5つはすべて広義のphp2shell、今回の騒動の元凶であるCVE-2026-109618/CVE-2026-109619に重きを置くのであればD、Eのみが狭義のphp2shellであると言えると思います。
(上記の補足もあるので、session.upload_progress悪用がphp2shellにおける必須の要素ではないですね。)
Session injection + LFIの観察
PoCではチェーンA、B、Cについての公開はありますが、今回の脆弱性を用いたチェーンD、Eについては限定公開となっています。
そのため、ここからはPHPをつかったRCEをSOCとして理解するために上記のチェーンAについて、EDRで検知した情報の一部を見ていきます。
チェーンAについて概要
チェーンAはSession injectionとLFIを組み合わせた攻撃チェーンです。
Session injectionとLFI、それぞれについては以下で説明します。
Session injectionについて
session.upload_progressはセッションファイルというファイルアップロード進捗を記録するファイルを生成します。
細工したリクエストを受け取ると、セッションファイルに進捗を記載する際に、ファイル名などのユーザー入力値がそのまま記録されるため、OSコマンドを実行するPHPコード(<?php system(...); ?> など)がセッションファイル内に無加工で記載されてしまいます。
session.upload_progressでは仕様上、 サニタイジングをせずにセッションファイルへの書き込みを行うようになっています。
LFIについて
PHPにはincludeという、外部ファイルを読み込んで実行する機能があります。
LFI(Local File Inclusion)はユーザーからの入力をもとに指示されたファイルを不用意に読み込む脆弱性です。
今回ではOSコマンドを実行するPHPコードが挿入されたセッションファイルのパス(/var/lib/php/sessions/sess_~)を指定しインクルードさせます。
その際読み込んだファイル(セッションファイル)の中にPHPコードがある場合、PHPエンジン(PHPスクリプトを実行する機能)はそのコードを 「実行可能なPHPコード」として解釈・実行してしまいます。
チェーンA成立の条件
チェーンAを成立させるためには、外部ファイルを検証をせず実行してしまうLFIの脆弱性があるアプリケーションが存在していることが条件です。
これは不十分な実装から生まれる脆弱性であるため成立するシチュエーションは限定的です。
プロセスツリーの特徴
チェーンAで検知したプロセスツリーは以下です。
今回は実際のシナリオに近づけわかりやすくするために、RCEで実行するコマンドをcurlでの通信に変更しています。
WebサーバーのプロセスであるApache2(PID:1034)からシェルのプロセスであるdashが生成されています。
これは今回のPoCのみならずRCEやWEBシェルでのOSコマンド実行の多くにおいて共通するプロセスツリーの特徴です。
dashの子プロセスを調査することで実行されたOSコマンドについて知ることができます。
シェルスクリプト実行の場合は複数の子プロセスを持つ可能性もあるので、集約されたプロセスツリーを見るだけではなくdashによって生成された子プロセスを洗い出すようにしましょう。
Webサーバーのプロセスからシェルプロセスが生成されていることに対して注意を持っておくことは脆弱性を使ったRCEやWEBシェルを早期に予測する助けとなります。
Apacheプロセスの調査
Apache2(PID:1034)には通信を受信したログがあります。
(以下のログはEDRで検知したログの属性名をわかりやすく修正・抜粋したものです。これは以降に記載するログについても同様です。)
EventName:NetworkReceiveAccept
ImageFileName:apache2
ProcessId:1034
SourceIPaddress:XXX.XXX.XXX.XXX
Port:80
このログからわかる通信元IPを頼りにFWやNDRでパケットを見つけ、中身を確認することはRCEの調査において有効に働く可能性が高いです。
今回のチェーンAでは、リクエストの特定の属性に入れる値を細工してセッションファイルに不正な値を書き込みます。
そのため、送られてきたリクエストにはRCEの実行や使用された脆弱性を裏付ける痕跡があるかもしれません。
異常なセッションファイル読み込み
Apache2(PID:1034)を調査するとセッションファイルをPHPスクリプトとして実行した旨のログがあることがわかりました。
EventName:PhpScriptExecution
ImageFileName:apache2
ProcessId:1034
ScriptFileName:/var/lib/php/sessions/sess_exploitb3c02674f7ae4eb1995f
ディレクトリ「/var/lib/php/sessions」にある「sess_~」というのがセッションファイルです。
セッションファイルを読み込むこと自体は通常通りの処理ですが、スクリプトとして実行することは普通ではありえません。
これは不正に書き込まれたセッションファイルをLFIによって実行されたことを示唆しています。
まとめ
新しい脆弱性を使った攻撃はEDR等のセキュリティ製品で検知できない場合が多々あります。
そのほかにも本質を懸念した内容ではないアラートが出たりすることがあります。
過去PHPの脆弱性を突かれRCEによってマイニングツールが配置されたクリプトジャッキングを見たことがありますが、EDRでのアラートはマイニングツールに対するPUPアラートだけでした。
そのような場合でもRCEやWEBシェルのプロセスツリーの特徴を意識しておけば、素早く調査方針を立てることができます。
今回のようなEDRでの観察が直接関係しなくとも調査時に仮説を立てる際に役に立てばいいなと思ってます。
PHP2Shell: The Patch Was Not the Start of the Incident
Four days before the PHP security team published its advisory on the php2shell flaws, Amazon Threat Intelligence had already caught an exploitation attempt against its honeypot network on 17 October 2026 (Source: Amazon Threat Intelligence, 2026). In the Philippines that gap is not academic, because the National Privacy Commission requires a personal information controller to notify it within 72 hours of knowing or reasonably believing a breach has occurred (Source: National Privacy Commission, 2016). The Department of Information and Communications Technology separately requires government agencies to fix critical vulnerabilities within five business days (Source: Newsbytes.PH, 2026).
!Infographic
What actually broke
PHP shipped fixed versions 8.2.35, 8.3.36, 8.4.27 and 8.5.12 on 21 October 2026, covering two flaws: CVE-2026-109618, remote code execution through out-of-memory corruption, and CVE-2026-109619, remote code execution through stale global state left by an earlier request (Source: PHP, 2026). The PHP security team rates both at CVSS v4.0 9.2, and the US National Vulnerability Database scores CVE-2026-109618 at 9.8 on the older CVSS 3.1 scale (Source: NIST, 2026).
The vulnerable code path dates back to PHP 5.4.0, released in 2012 (Source: Tenable, 2026). Every PHP installation serving web requests is affected, and the PHP team considers risk highest for Apache with mod_php, where a demonstrated exploit can trigger before any application code runs (Source: PHP, 2026). PHP runs on 69.3 percent of websites whose server-side language is known, and 7.7 percent of PHP sites still run the end-of-life 5.x branch (Source: W3Techs, 2026).
The clock started before the advisory
Two teams reached opposite conclusions within 24 hours, and both are worth holding. Sansec reported on 22 October that mass exploitation was less likely than first expected, because the public proof-of-concept exploits do not work against a default PHP installation (Source: Sansec, 2026). Tenable reported on the same date that php2shell was being broadly exploited in the wild (Source: Tenable, 2026).
Amazon Threat Intelligence recommends starting investigations from at least 17 October, not the disclosure date, and argues that the gap between a patch and a working exploit keeps shrinking, partly because AI-assisted analysis turns a patch diff into an exploit faster (Source: Amazon Threat Intelligence, 2026). CISA advises organisations that cannot update immediately, or that run unsupported PHP 8.1 and earlier, to take PHP-based systems offline until they can be patched (Source: CISA, 2026).
Why a memory bug becomes a privacy incident
CVE-2026-109618 does more than execute code. PHP's upload-progress handler can return freed worker memory to the client inside a PHPSESSID cookie, and that memory can hold passwords, session tokens, API keys and TLS private keys from other requests (Source: Sansec, 2026).
That is where Philippine rules engage. Section 14 of NPC Circular 16-03 states that discovery of a vulnerability allowing access to personal data shall prompt the controller to assess whether a personal data breach has occurred (Source: National Privacy Commission, 2016). Section 11 lists usernames, passwords and other login data among the information that triggers notification when there is reason to believe it was acquired without authorization and a real risk of serious harm exists (Source: National Privacy Commission, 2016).
Section 22 reaches beyond notification. Every security incident and personal data breach must be documented in written reports, including those below the notification threshold, and a summary goes to the Commission annually (Source: National Privacy Commission, 2016). For 2025, that window is open until 10 November 2026, it must go through the Data Breach Notification Management System rather than email, and a zero-incident report is still required (Source: National Privacy Commission, 2026).
A workplan for 72 hours
- Inventory every host running PHP, including hosts where PHP arrives as a dependency of WordPress or Laravel rather than a deliberate install (Source: CISA, 2026).
- Move to a fixed PHP release and restart every worker (Source: PHP, 2026).
- If patching is not immediate, set session.upload_progress.enabled to 0 and memory_limit to -1 where applications cannot override them, then restart every worker (Source: PHP, 2026).
- Hunt web server logs for POST requests carrying the PHP_SESSION_UPLOAD_PROGRESS string in multipart form bodies, and for PHP workers launching shells (Source: Amazon Threat Intelligence, 2026).
- Deploy the community Suricata, Sigma and ModSecurity detection rules before patching finishes, so the alert arrives with the fix (Source: GitHub, 2026).
Yano.AI applies this same priority order inside its Cognitive AI approach to security operations: rank exposure by what is internet-facing and exploitable, close it, then prove what happened from logs rather than assumption. Machines read the log volume; the judgement about what constitutes a notifiable breach stays with the people who own the data.
FAQ
Q: Do I need to worry if my site is not built on PHP?
A: Yes, if PHP is present at all. The flaws sit in the PHP engine, so a Magento or WooCommerce store can be affected even when its own code is clean (Source: Sansec, 2026). WordPress alone is 39.6 percent of all websites, and it runs on PHP (Source: W3Techs, 2026).
Q: What if we run an end-of-life PHP version?
A: PHP no longer publishes official releases for 8.1 and older, but the security team published minimal source backports for 7.4, 8.0 and 8.1, and some vendors backported the fix into packaged builds (Source: PHP, 2026). PHP 8.2 itself reaches end of life on 31 December 2026 (Source: PHP, 2026).
Q: If we find no evidence of compromise, do we still have a reporting duty?
A: Yes. Section 22 of NPC Circular 16-03 requires written documentation of every security incident, including those below the notification threshold (Source: National Privacy Commission, 2016). The 2025 Annual Security Incident Report must still be filed through the DBNMS by 10 November 2026 (Source: National Privacy Commission, 2026).
Key Takeaway
The disclosure date was not the beginning. Exposure started on 17 October 2026, and by the time PHP shipped the fix, working exploits were already circulating against it (Source: Amazon Threat Intelligence, 2026). For Philippine organisations, patching and reporting are the same job: inventory, patch, hunt from 17 October, and document everything, including incidents that never crossed the notification threshold. What PHP version is running on your most exposed server right now, and who signs the report to the National Privacy Commission if it was compromised?
Sources
- PHP Security Advisory: Critical RCE vulnerabilities (PHP, 2026)
- PHP Supported Versions (PHP, 2026)
- NVD CVE-2026-109618 record (NIST, 2026)
- Amazon Threat Intelligence: PHP2Shell exploitation (Amazon, 2026)
- CISA Alert: Critical PHP Vulnerabilities (CISA, 2026)
- php2shell FAQ (Tenable, 2026)
- PHP2Shell: PHP RCE research (Sansec, 2026)
- PHP Usage Statistics (W3Techs, 2026)
- WordPress Usage Statistics (W3Techs, 2026)
- NPC Circular No. 16-03, Personal Data Breach Management (National Privacy Commission, 2016)
- NPC Advisory No. 2026-03: Annual Security Incident Reports (National Privacy Commission, 2026)
- DICT orders annual security testing for gov't IT systems (Newsbytes.PH, 2026)
- ikow/php2shell-poc detection rules (GitHub, 2026)
GitHub Top 10 This Week — Week of October 23, 2026 (Ep. 007) | Best New Open Source Repos
🔥 GitHub Top 10 for Week of October 23, 2026 — the most-starred new open source repositories this week, curated every Friday by TheMrOzz.
This week's top picks: cleanyourtv, MacNativeGames, free-my-tv — and 7 more you need to see!
Whether you're a software engineer, indie developer, or just love open source, this weekly series keeps you on the cutting edge of GitHub trending repos — AI tools, developer utilities, programming frameworks, and more.
📌 TIMESTAMPS:
0:00 Intro — Week of October 23, 2026
0:10 #1 Gathin23/cleanyourtv (26,985 ⭐)
0:55 #2 ly05010419/MacNativeGames (4,802 ⭐)
1:40 #3 simbasjungles/free-my-tv (3,787 ⭐)
2:25 #4 pengchujin/aerial-tv (3,733 ⭐)
3:10 #5 xiaoyang111222/cn-math-taxonomy (2,689 ⭐)
3:55 #6 tek-sys-hub/Rubix-lang (1,913 ⭐)
4:40 #7 aicodeking/leanrea (1,679 ⭐)
5:25 #8 ikow/php2shell-poc (1,651 ⭐)
6:10 #9 JoasASantos/REA-Prompts (1,635 ⭐)
6:55 #10 alchaincyf/huashu-motion (1,519 ⭐)
7:40 Outro
💡 Featured languages this week: Java, C, Kotlin, Python
📂 Full list:
#1 Gathin23/cleanyourtv — 26,985 stars | Gathin23/cleanyourtv
#2 ly05010419/MacNativeGames — 4,802 stars | ly05010419/MacNativeGames
#3 simbasjungles/free-my-tv — 3,787 stars | simbasjungles/free-my-tv
#4 pengchujin/aerial-tv — 3,733 stars | pengchujin/aerial-tv
#5 xiaoyang111222/cn-math-taxonomy — 2,689 stars | xiaoyang111222/cn-math-taxonomy
#6 tek-sys-hub/Rubix-lang — 1,913 stars | tek-sys-hub/Rubix-lang
#7 aicodeking/leanrea — 1,679 stars | aicodeking/leanrea
#8 ikow/php2shell-poc — 1,651 stars | ikow/php2shell-poc
#9 JoasASantos/REA-Prompts — 1,635 stars | JoasASantos/REA-Prompts
#10 alchaincyf/huashu-motion — 1,519 stars | alchaincyf/huashu-motion
🔔 New episode every Friday at 10 PM TRT / 7 PM UTC.
Subscribe so you never miss a GitHub trend!
#github #opensource #programming #developer #githubtrending #coding #TheMrOzz #weeklytop10 #tech #openSource #devtools #softwareengineering #repositories #newrepos #buildInPublic
21 views
من تست کردم، این به شکل ترسناکی کار میکنه!
خودش یه داکر با نسخه آسیب پذیر داره که رن میکنید و با زدن دستور اجرای اکسپلویت به راحتی از راه دور هر فرمانی رو روی اون سرور اجرا میکنه!
ikow/php2shell-poc
#هک #PHP #امنیت
CVE-2026-109618 / CVE-2026-109619 t.co
51 likes · 1 repost · 2,340 views
There isn't an easy exploit for this PHP vulnerability
>I don't think this PHP vulnerability is that exploitable. I think that 5 years ago people would've understood this, but now people are being deluded by their LLMs telling them they have an exploit when they don't.
>One really amusing thing in common with most of these "PoC"s is that they lean on "LFI", or local-file-inclusion, to make the vulnerability. In non-php terms, their exploit chain requires the server to already have a severe code-level vulnerability.
>It's not rare for PHP apps to be fucked in some sense, but requiring the server to have an existing vulnerability where users could cat /etc/password is an insane pre-requisite. If you need this, this does not make this a severe bug.
>The strangest thing is that so many people have independently made this extraordinarily weird defect in judgement. That is because they haven't independently made this decision. Claude/Etc. has done all of the judgement for them, hence the bizarre distribution in logical errors.
>There's something important to be said here about how many people have Claude/GPT make design decisions for them, and how AI is the primary decision maker in the world right now. You've got this bizarre case of "Decision Schelling Points" where a method of solving a problem is extremely overrepresented, because it's what Claude does out of the box.
116 points · 130 comments
Beyond lab setup the best so far that I could reach to real exploitation on PHP is hitting OOM. No markers, no callback. Best resource seen 9bie/php2shell-bypass-aslr-exp (initial aslr-on chain), highest promising work, ikow/php2shell-poc (don't go for the paid module has nothing) and of course the latest update from Calif calif.io
127 likes · 22 reposts · 7,855 views
Mentions
Two PHP CVEs (CVSS 9.2) give pre-auth RCE via session.upload_progress, hitting PHP 5.4–8.5.11. Fixed in 8.2.35/8.3.36/8.4.27/8.5.12. Can't patch yet? Disable upload_progress. #PHP #security ikow/php2shell-poc
#5 php2shell-poc: 5 RCE Chains + Detection Rules CVE-2026-109618/109619 exposed critical pre-auth RCE vectors in PHP via session.upload_progress. This trending repo delivers 5 exploit chains and comprehensive detection rules for Suricata, Sigma, and ModSecurity. Essential for any security team managing PHP environments. Check out the code: github.com/php2shell-poc GitHub: ikow/php2shell-poc Part of the Weekly Top 5 GitHub Repos series. Every week, the 5 repos with the most new stars. #GitHubTrending #GitHub #OpenSource #Dev #WeeklyTop5
Top 5 New GitHub Repos This Week (Ranked by Stars) #Shorts Top 5 new GitHub repos this week, ranked by stars. Number 5: php2shell-poc. CVE-2026-109618/109619 5 RCE chains + detection rules (Suricata, Sigma, ModSecurity). PHP... 1,761 stars. In this Short: - Number 4: fairplay-decrypt. Offline FairPlay App Store IPA decryption with independent key derivation. 2,003... - Number 3: REA-Prompts. REAP - Prompts for you to use REA (Reverse Engineer Anything), get the most out of... - Number 2: gpu-unlock. Unlock FP/BF16 instruction issue rate on Nvidia 3000's cards to their professional... - Number 1: free-my-tv. A fast, ad-free home screen for Google TV, LG webOS and Samsung Tizen. One button to... Which one is your #1? Here are the links: 1. simbasjungles/free-my-tv - simbasjungles/free-my-tv 2. Zagitta/gpu-unlock - Zagitta/gpu-unlock 3. JoasASantos/REA-Prompts - JoasASantos/REA-Prompts 4. EthanArbuckle/fairplay-decrypt - EthanArbuckle/fairplay-decrypt 5. ikow/php2shell-poc - ikow/php2shell-poc The top new GitHub repos of the week, ranked by stars. A new top 5 every week. Narrated with an AI clone of the creator's own voice. #Shorts #GitHub #OpenSource #Top5 #Programming #TechNews
Here are the links: 1. simbasjungles/free-my-tv - simbasjungles/free-my-tv 2. Zagitta/gpu-unlock - Zagitta/gpu-unlock 3. JoasASantos/REA-Prompts - JoasASantos/REA-Prompts 4. EthanArbuckle/fairplay-decrypt - EthanArbuckle/fairplay-decrypt 5. ikow/php2shell-poc - ikow/php2shell-poc Which one is your #1?
PHPにおけるSession injectionとLFIのRCEチェーンの観察 最初に 本記事は著者自身が勉強したものを整理したり知識を共有するために記載しています。 用語の説明には本質から逸脱しないよう努めますが、読みやすさの観点からある程度抽象性を持たせています。 そのため正確な情報を約束するものではないのでご了承ください。 php2shellというけれど 脆弱性CVE-2026-109618/CVE-2026-109619、いわゆるphp2shellについて会社がてんやわんやする中、「php2shellの対応で~」なんて言ったり聞いたりすることが多々ありました。 ふと、「脆弱性って2つあるけど、どっちもphp2shellなん?」と思ったので、お勉強。 今回はGitHubで公開されているPoCを通してphp2shellってなんだろうを考え、昔からあるSession injection + LFIのRCEをEDRから覗いてみようかと思います。 注意事項 今回のPoCでは現在話題になっているCVE-2026-109618/CVE-2026-109619は使用しません。 類似の手法を観察しphp2shellとこれら2つの脆弱性の関係を理解します。 php2shellについて php2shellを理解するために以下のPoCを参考にします。 ikow/php2shell-poc CVE-2026-109618/CVE-2026-109619の概要 脆弱性 説明 CVE-2026-109618 メモリ不足(OOM)のエラー処理に起因する脆弱性 CVE-2026-109619 不正なリクエスト処理によってUAFが発生する脆弱性 UAF(Use-After-Free)はCTFでちょこちょこ見たので、改めてメモリの中を見ながら解いてみようかなーと思いました。 これらの脆弱性はどちらもRCE(リモートコード実行)につながる脆弱性です。 session.upload_progressを使ったアタックチェーン PHPにはsession.upload_progressというファイルアップロードの進捗を管理する機能があります。 この機能の悪用とCVE-2026-109618やCVE-2026-109619を組み合わせて行うRCEがphp2shellという手法です。 php2shellはsession.upload_progressの悪用を足がかりとして脆弱性の悪用へとつなぐRCEを実現するためのアタックチェーンと言えます。 補足:CVE-2026-109618、CVE-2026-109619を使用したphp2shellではsession.upload_progressの悪用は数ある足がかりのひとつでしかないことが後から判明しました。 これはsession.upload_progressを無効化することが限定的な対処にしかならないということを示しています。 5つの攻撃チェーン PoCではsession.upload_progressの悪用からの攻撃チェーンの展開先として5つの手法が紹介されています。 これらはsession.upload_progressの悪用という観点では共通していますが、悪用の方法についても異なっています。 チェーン 概要 内容 A Session injection + LFI セッション汚染からのLFI B var_destroy UAF → handler overwrite PHPエンジン内のUAF C Handler mismatch → __destruct PHP-FPM の状態不整合 D OOM corruption → stale EG() CVE-2026-109618の利用 E FPM session OOM → stale BG() CVE-2026-109619の利用 聞きなれない言葉が並びますが、CVE-2026-109618/CVE-2026-109619を利用したものを含む5つの攻撃チェーンが存在していることがわかります。 チェーンA、B、CにおいてはRCEを実現するための他の条件が存在しますが、D、Eに関しては他の条件が存在しません。 このことから今回発表された脆弱性がいかに重大なものであるかがわかります。 session.upload_progressの悪用等から展開されたRCEチェーンという観点であれば、上記の5つはすべて広義のphp2shell、今回の騒動の元凶であるCVE-2026-109618/CVE-2026-109619に重きを置くのであればD、Eのみが狭義のphp2shellであると言えると思います。 (上記の補足もあるので、session.upload_progress悪用がphp2shellにおける必須の要素ではないですね。) Session injection + LFIの観察 PoCではチェーンA、B、Cについての公開はありますが、今回の脆弱性を用いたチェーンD、Eについては限定公開となっています。 そのため、ここからはPHPをつかったRCEをSOCとして理解するために上記のチェーンAについて、EDRで検知した情報の一部を見ていきます。 チェーンAについて概要 チェーンAはSession injectionとLFIを組み合わせた攻撃チェーンです。 Session injectionとLFI、それぞれについては以下で説明します。 Session injectionについて session.upload_progressはセッションファイルというファイルアップロード進捗を記録するファイルを生成します。 細工したリクエストを受け取ると、セッションファイルに進捗を記載する際に、ファイル名などのユーザー入力値がそのまま記録されるため、OSコマンドを実行するPHPコード(<?php system(...); ?> など)がセッションファイル内に無加工で記載されてしまいます。 session.upload_progressでは仕様上、 サニタイジングをせずにセッションファイルへの書き込みを行うようになっています。 LFIについて PHPにはincludeという、外部ファイルを読み込んで実行する機能があります。 LFI(Local File Inclusion)はユーザーからの入力をもとに指示されたファイルを不用意に読み込む脆弱性です。 今回ではOSコマンドを実行するPHPコードが挿入されたセッションファイルのパス(/var/lib/php/sessions/sess_~)を指定しインクルードさせます。 その際読み込んだファイル(セッションファイル)の中にPHPコードがある場合、PHPエンジン(PHPスクリプトを実行する機能)はそのコードを 「実行可能なPHPコード」として解釈・実行してしまいます。 チェーンA成立の条件 チェーンAを成立させるためには、外部ファイルを検証をせず実行してしまうLFIの脆弱性があるアプリケーションが存在していることが条件です。 これは不十分な実装から生まれる脆弱性であるため成立するシチュエーションは限定的です。 プロセスツリーの特徴 チェーンAで検知したプロセスツリーは以下です。 今回は実際のシナリオに近づけわかりやすくするために、RCEで実行するコマンドをcurlでの通信に変更しています。 WebサーバーのプロセスであるApache2(PID:1034)からシェルのプロセスであるdashが生成されています。 これは今回のPoCのみならずRCEやWEBシェルでのOSコマンド実行の多くにおいて共通するプロセスツリーの特徴です。 dashの子プロセスを調査することで実行されたOSコマンドについて知ることができます。 シェルスクリプト実行の場合は複数の子プロセスを持つ可能性もあるので、集約されたプロセスツリーを見るだけではなくdashによって生成された子プロセスを洗い出すようにしましょう。 Webサーバーのプロセスからシェルプロセスが生成されていることに対して注意を持っておくことは脆弱性を使ったRCEやWEBシェルを早期に予測する助けとなります。 Apacheプロセスの調査 Apache2(PID:1034)には通信を受信したログがあります。 (以下のログはEDRで検知したログの属性名をわかりやすく修正・抜粋したものです。これは以降に記載するログについても同様です。) EventName:NetworkReceiveAccept ImageFileName:apache2 ProcessId:1034 SourceIPaddress:XXX.XXX.XXX.XXX Port:80 このログからわかる通信元IPを頼りにFWやNDRでパケットを見つけ、中身を確認することはRCEの調査において有効に働く可能性が高いです。 今回のチェーンAでは、リクエストの特定の属性に入れる値を細工してセッションファイルに不正な値を書き込みます。 そのため、送られてきたリクエストにはRCEの実行や使用された脆弱性を裏付ける痕跡があるかもしれません。 異常なセッションファイル読み込み Apache2(PID:1034)を調査するとセッションファイルをPHPスクリプトとして実行した旨のログがあることがわかりました。 EventName:PhpScriptExecution ImageFileName:apache2 ProcessId:1034 ScriptFileName:/var/lib/php/sessions/sess_exploitb3c02674f7ae4eb1995f ディレクトリ「/var/lib/php/sessions」にある「sess_~」というのがセッションファイルです。 セッションファイルを読み込むこと自体は通常通りの処理ですが、スクリプトとして実行することは普通ではありえません。 これは不正に書き込まれたセッションファイルをLFIによって実行されたことを示唆しています。 まとめ 新しい脆弱性を使った攻撃はEDR等のセキュリティ製品で検知できない場合が多々あります。 そのほかにも本質を懸念した内容ではないアラートが出たりすることがあります。 過去PHPの脆弱性を突かれRCEによってマイニングツールが配置されたクリプトジャッキングを見たことがありますが、EDRでのアラートはマイニングツールに対するPUPアラートだけでした。 そのような場合でもRCEやWEBシェルのプロセスツリーの特徴を意識しておけば、素早く調査方針を立てることができます。 今回のようなEDRでの観察が直接関係しなくとも調査時に仮説を立てる際に役に立てばいいなと思ってます。
PHP2Shell: The Patch Was Not the Start of the Incident Four days before the PHP security team published its advisory on the php2shell flaws, Amazon Threat Intelligence had already caught an exploitation attempt against its honeypot network on 17 October 2026 (Source: Amazon Threat Intelligence, 2026). In the Philippines that gap is not academic, because the National Privacy Commission requires a personal information controller to notify it within 72 hours of knowing or reasonably believing a breach has occurred (Source: National Privacy Commission, 2016). The Department of Information and Communications Technology separately requires government agencies to fix critical vulnerabilities within five business days (Source: Newsbytes.PH, 2026). !Infographic What actually broke PHP shipped fixed versions 8.2.35, 8.3.36, 8.4.27 and 8.5.12 on 21 October 2026, covering two flaws: CVE-2026-109618, remote code execution through out-of-memory corruption, and CVE-2026-109619, remote code execution through stale global state left by an earlier request (Source: PHP, 2026). The PHP security team rates both at CVSS v4.0 9.2, and the US National Vulnerability Database scores CVE-2026-109618 at 9.8 on the older CVSS 3.1 scale (Source: NIST, 2026). The vulnerable code path dates back to PHP 5.4.0, released in 2012 (Source: Tenable, 2026). Every PHP installation serving web requests is affected, and the PHP team considers risk highest for Apache with mod_php, where a demonstrated exploit can trigger before any application code runs (Source: PHP, 2026). PHP runs on 69.3 percent of websites whose server-side language is known, and 7.7 percent of PHP sites still run the end-of-life 5.x branch (Source: W3Techs, 2026). The clock started before the advisory Two teams reached opposite conclusions within 24 hours, and both are worth holding. Sansec reported on 22 October that mass exploitation was less likely than first expected, because the public proof-of-concept exploits do not work against a default PHP installation (Source: Sansec, 2026). Tenable reported on the same date that php2shell was being broadly exploited in the wild (Source: Tenable, 2026). Amazon Threat Intelligence recommends starting investigations from at least 17 October, not the disclosure date, and argues that the gap between a patch and a working exploit keeps shrinking, partly because AI-assisted analysis turns a patch diff into an exploit faster (Source: Amazon Threat Intelligence, 2026). CISA advises organisations that cannot update immediately, or that run unsupported PHP 8.1 and earlier, to take PHP-based systems offline until they can be patched (Source: CISA, 2026). Why a memory bug becomes a privacy incident CVE-2026-109618 does more than execute code. PHP's upload-progress handler can return freed worker memory to the client inside a PHPSESSID cookie, and that memory can hold passwords, session tokens, API keys and TLS private keys from other requests (Source: Sansec, 2026). That is where Philippine rules engage. Section 14 of NPC Circular 16-03 states that discovery of a vulnerability allowing access to personal data shall prompt the controller to assess whether a personal data breach has occurred (Source: National Privacy Commission, 2016). Section 11 lists usernames, passwords and other login data among the information that triggers notification when there is reason to believe it was acquired without authorization and a real risk of serious harm exists (Source: National Privacy Commission, 2016). Section 22 reaches beyond notification. Every security incident and personal data breach must be documented in written reports, including those below the notification threshold, and a summary goes to the Commission annually (Source: National Privacy Commission, 2016). For 2025, that window is open until 10 November 2026, it must go through the Data Breach Notification Management System rather than email, and a zero-incident report is still required (Source: National Privacy Commission, 2026). A workplan for 72 hours - Inventory every host running PHP, including hosts where PHP arrives as a dependency of WordPress or Laravel rather than a deliberate install (Source: CISA, 2026). - Move to a fixed PHP release and restart every worker (Source: PHP, 2026). - If patching is not immediate, set session.upload_progress.enabled to 0 and memory_limit to -1 where applications cannot override them, then restart every worker (Source: PHP, 2026). - Hunt web server logs for POST requests carrying the PHP_SESSION_UPLOAD_PROGRESS string in multipart form bodies, and for PHP workers launching shells (Source: Amazon Threat Intelligence, 2026). - Deploy the community Suricata, Sigma and ModSecurity detection rules before patching finishes, so the alert arrives with the fix (Source: GitHub, 2026). Yano.AI applies this same priority order inside its Cognitive AI approach to security operations: rank exposure by what is internet-facing and exploitable, close it, then prove what happened from logs rather than assumption. Machines read the log volume; the judgement about what constitutes a notifiable breach stays with the people who own the data. FAQ Q: Do I need to worry if my site is not built on PHP? A: Yes, if PHP is present at all. The flaws sit in the PHP engine, so a Magento or WooCommerce store can be affected even when its own code is clean (Source: Sansec, 2026). WordPress alone is 39.6 percent of all websites, and it runs on PHP (Source: W3Techs, 2026). Q: What if we run an end-of-life PHP version? A: PHP no longer publishes official releases for 8.1 and older, but the security team published minimal source backports for 7.4, 8.0 and 8.1, and some vendors backported the fix into packaged builds (Source: PHP, 2026). PHP 8.2 itself reaches end of life on 31 December 2026 (Source: PHP, 2026). Q: If we find no evidence of compromise, do we still have a reporting duty? A: Yes. Section 22 of NPC Circular 16-03 requires written documentation of every security incident, including those below the notification threshold (Source: National Privacy Commission, 2016). The 2025 Annual Security Incident Report must still be filed through the DBNMS by 10 November 2026 (Source: National Privacy Commission, 2026). Key Takeaway The disclosure date was not the beginning. Exposure started on 17 October 2026, and by the time PHP shipped the fix, working exploits were already circulating against it (Source: Amazon Threat Intelligence, 2026). For Philippine organisations, patching and reporting are the same job: inventory, patch, hunt from 17 October, and document everything, including incidents that never crossed the notification threshold. What PHP version is running on your most exposed server right now, and who signs the report to the National Privacy Commission if it was compromised? Sources - PHP Security Advisory: Critical RCE vulnerabilities (PHP, 2026) - PHP Supported Versions (PHP, 2026) - NVD CVE-2026-109618 record (NIST, 2026) - Amazon Threat Intelligence: PHP2Shell exploitation (Amazon, 2026) - CISA Alert: Critical PHP Vulnerabilities (CISA, 2026) - php2shell FAQ (Tenable, 2026) - PHP2Shell: PHP RCE research (Sansec, 2026) - PHP Usage Statistics (W3Techs, 2026) - WordPress Usage Statistics (W3Techs, 2026) - NPC Circular No. 16-03, Personal Data Breach Management (National Privacy Commission, 2016) - NPC Advisory No. 2026-03: Annual Security Incident Reports (National Privacy Commission, 2026) - DICT orders annual security testing for gov't IT systems (Newsbytes.PH, 2026) - ikow/php2shell-poc detection rules (GitHub, 2026)
GitHub Top 10 This Week — Week of October 23, 2026 (Ep. 007) | Best New Open Source Repos 🔥 GitHub Top 10 for Week of October 23, 2026 — the most-starred new open source repositories this week, curated every Friday by TheMrOzz. This week's top picks: cleanyourtv, MacNativeGames, free-my-tv — and 7 more you need to see! Whether you're a software engineer, indie developer, or just love open source, this weekly series keeps you on the cutting edge of GitHub trending repos — AI tools, developer utilities, programming frameworks, and more. 📌 TIMESTAMPS: 0:00 Intro — Week of October 23, 2026 0:10 #1 Gathin23/cleanyourtv (26,985 ⭐) 0:55 #2 ly05010419/MacNativeGames (4,802 ⭐) 1:40 #3 simbasjungles/free-my-tv (3,787 ⭐) 2:25 #4 pengchujin/aerial-tv (3,733 ⭐) 3:10 #5 xiaoyang111222/cn-math-taxonomy (2,689 ⭐) 3:55 #6 tek-sys-hub/Rubix-lang (1,913 ⭐) 4:40 #7 aicodeking/leanrea (1,679 ⭐) 5:25 #8 ikow/php2shell-poc (1,651 ⭐) 6:10 #9 JoasASantos/REA-Prompts (1,635 ⭐) 6:55 #10 alchaincyf/huashu-motion (1,519 ⭐) 7:40 Outro 💡 Featured languages this week: Java, C, Kotlin, Python 📂 Full list: #1 Gathin23/cleanyourtv — 26,985 stars | Gathin23/cleanyourtv #2 ly05010419/MacNativeGames — 4,802 stars | ly05010419/MacNativeGames #3 simbasjungles/free-my-tv — 3,787 stars | simbasjungles/free-my-tv #4 pengchujin/aerial-tv — 3,733 stars | pengchujin/aerial-tv #5 xiaoyang111222/cn-math-taxonomy — 2,689 stars | xiaoyang111222/cn-math-taxonomy #6 tek-sys-hub/Rubix-lang — 1,913 stars | tek-sys-hub/Rubix-lang #7 aicodeking/leanrea — 1,679 stars | aicodeking/leanrea #8 ikow/php2shell-poc — 1,651 stars | ikow/php2shell-poc #9 JoasASantos/REA-Prompts — 1,635 stars | JoasASantos/REA-Prompts #10 alchaincyf/huashu-motion — 1,519 stars | alchaincyf/huashu-motion 🔔 New episode every Friday at 10 PM TRT / 7 PM UTC. Subscribe so you never miss a GitHub trend! #github #opensource #programming #developer #githubtrending #coding #TheMrOzz #weeklytop10 #tech #openSource #devtools #softwareengineering #repositories #newrepos #buildInPublic
من تست کردم، این به شکل ترسناکی کار میکنه! خودش یه داکر با نسخه آسیب پذیر داره که رن میکنید و با زدن دستور اجرای اکسپلویت به راحتی از راه دور هر فرمانی رو روی اون سرور اجرا میکنه! ikow/php2shell-poc #هک #PHP #امنیت CVE-2026-109618 / CVE-2026-109619 t.co
There isn't an easy exploit for this PHP vulnerability >I don't think this PHP vulnerability is that exploitable. I think that 5 years ago people would've understood this, but now people are being deluded by their LLMs telling them they have an exploit when they don't. >One really amusing thing in common with most of these "PoC"s is that they lean on "LFI", or local-file-inclusion, to make the vulnerability. In non-php terms, their exploit chain requires the server to already have a severe code-level vulnerability. >It's not rare for PHP apps to be fucked in some sense, but requiring the server to have an existing vulnerability where users could cat /etc/password is an insane pre-requisite. If you need this, this does not make this a severe bug. >The strangest thing is that so many people have independently made this extraordinarily weird defect in judgement. That is because they haven't independently made this decision. Claude/Etc. has done all of the judgement for them, hence the bizarre distribution in logical errors. >There's something important to be said here about how many people have Claude/GPT make design decisions for them, and how AI is the primary decision maker in the world right now. You've got this bizarre case of "Decision Schelling Points" where a method of solving a problem is extremely overrepresented, because it's what Claude does out of the box.
Beyond lab setup the best so far that I could reach to real exploitation on PHP is hitting OOM. No markers, no callback. Best resource seen 9bie/php2shell-bypass-aslr-exp (initial aslr-on chain), highest promising work, ikow/php2shell-poc (don't go for the paid module has nothing) and of course the latest update from Calif calif.io