CVE-2026-133347: PHP Object Injection in Joomla File Cache guard handling (1.5.0-5.4.11, 6.0.0-6.2.1)
<h1 align="center">Joomla File Cache PHP Object Injection (CVE-2026-133347) PoC</h1>
<p align="center">
<img src="https://api.visitorbadge.io/api/visitors?path=https%3A%2F%2Fgithub.com%2Fjoshuavanderpoll%2FCVE-2026-133347&label=Views&countColor=%2337d67a" />
<img src="https://img.shields.io/badge/python-%23FFDF76.svg?style=for-the-badge&logo=python&logoColor=black" alt="Python">
<img src="https://img.shields.io/badge/joomla-%235091CD.svg?style=for-the-badge&logo=joomla&logoColor=white" alt="Joomla">
</p>
## Demo
<p align="center">
<img src="assets/demo.gif" alt="CVE-2026-133347 PoC Demo" width="800">
</p>
## Description
CVE-2026-133347 is a PHP object injection vulnerability in Joomla's file cache storage handler (`FileStorage.php`). The file cache guard removal logic uses `str_replace` to strip a protective `<?php die("Access Denied"); ?>` header from cached data. Because `str_replace` removes **all** occurrences rather than just the leading one, an attacker who can influence cached content can embed the guard string to manipulate the deserialized output, achieving PHP object injection and potentially remote code execution.
The vulnerability was reported by Nicolas Markitanis (R3D) on 2026-11-25 and fixed on 2026-12-01.
**Affected versions:** Joomla 1.5.0 through 5.4.11, Joomla 6.0.0 through 6.2.1
**Patched versions:** Joomla 5.4.12, Joomla 6.2.2
**Severity:** Critical (Joomla rating)
## How It Works
1. Joomla's `FileStorage` writes cache entries as PHP files with a die guard prefix:
```
<?php die("Access Denied"); ?>#x#<serialized_data>
```
2. When reading cache, `get()` calls `str_replace('<?php die("Access Denied"); ?>#x#', '', $data)` to strip the guard
3. `str_replace` removes **every** match in the string, not just the leading one
4. An attacker who can inject the guard string into cached data can craft a payload where guard removal produces a valid serialized PHP object
5. The unserialized result gives the attacker control