PHP Session Upload Progress Enables File Inclusion Code Execution
Vulnerability Disclosure · 5 sources · Updated 2mo ago · First seen Sep 4, 2015

A HITCON CTF exploit demonstrated how PHP's default session.upload_progress feature can be abused to place attacker-influenced data in a server-side session file and execute it through a local file inclusion (LFI) flaw. Against Ubuntu 18.04 with Apache and PHP 7.2, the technique used multipart upload progress, a timing race before session cleanup, and inclusion of the resulting session file despite the absence of remote file inclusion and a conventional session-start path.
The payload bypassed PHP's default upload-progress prefix and session-file formatting by applying chained Base64-decoding stream filters, transforming the stored session content into executable PHP. The technique illustrates the risk of PHP session-data injection when applications permit attacker-controlled file inclusion; organizations should disable unnecessary upload-progress tracking, restrict session-file access, and eliminate LFI primitives. Separately, older PHP unserialize() flaws involving SplDoublyLinkedList and __wakeup() could expose vulnerable pre-patch versions to memory disclosure or remote code execution when processing attacker-controlled serialized objects.

