CVE-2026-133347 — Joomla! Project Joomla! CMS (1.5.0-5.4.11) — CWE-502
Joomla! Core - [20261201] - Core - PHP object injection through file cache guard handling in Joomla 1.5.0-5.4.11, 6.0.0-6.2.1 - The file cache storage removed every occurrence of its protection header from cached data instead of only the leading one, leading to PHP object injection vectors.
Joomla! Core - [20261201] - Core - PHP object injection through file cache guard handling in Joomla 1.5.0-5.4.11, 6.0.0-6.2.1 - The file cache storage removed every occurrence of its protection header from cached data instead of only the leading one, leading to PHP object injection vectors.
🎯 What is this vulnerability?
Technical root‑cause
Joomla’s file‑based cache (JCacheStorageFile) protects cached PHP files by prepending a guard header:
<?php die('Forbidden'); ?>When the cache is read, the guard header is stripped once from the beginning of the cached data.
The bug in Joomla 1.5.0‑5.4.11 and 6.0.0‑6.2.1 removes every occurrence of that header string from the cached payload, not just the leading one.
If an attacker can inject a serialized PHP object into the cache, the guard header removal will strip the header from the serialized string, leaving the object intact. When the cache is later read, Joomla unserialises the data, triggering the object’s magic methods (__wakeup, __destruct, etc.). This is a classic PHP Object Injection (CWE‑502) that can lead to Remote Code Execution (RCE) if a gadget chain is available.
Key points
| Item | Detail |
|---|---|
| Affected component | JCacheStorageFile (file‑based cache) |
| Trigger | Cache entry containing a serialized object |
| Guard header | <?php die('Forbidden'); ?> |
| Bug | Header removal removes *all* occurrences, not just the first |
| Result | Serialized object survives cache read → unserialize() → gadget chain → RCE |
| Authentication | Requires a user with high‑privilege (e.g., administrator) to write to the cache, because PR:H in the CVSS vector. |
| No user interaction | The vulnerability is exploitable without user interaction once a high‑privilege account is compromised. |
⚡ Attack Chain
Below is a realistic, step‑by‑step chain that an attacker could use against a Joomla site running one of the affected versions.
All code snippets are syntactically correct PHP/HTTP; the exact endpoint names are illustrative because the CVE description does not specify them.
1. Discovery & Reconnaissance
| Step | Technique | What you learn |
|---|---|---|
| 1.1 | HTTP fingerprinting | Detect Joomla by the presence of /administrator/ or the X-Generator: Joomla! header. |
| 1.2 | Version enumeration | Access /administrator/ or /index.php?option=com_version to read the Joomla! version string. |
| 1.3 | Privilege check | Attempt to log in with a known admin account (or brute‑force if possible). |
| 1.4 | Cache API discovery | Query /index.php?option=com_cache or inspect the source of a component that uses JCache::getInstance() to confirm that the site uses file‑based caching. |
2. Exploitation
Goal: Write a malicious serialized object into the cache so that it survives the guard‑header removal and is later unserialised.
2.1 Crafting the payload
A minimal gadget chain that triggers system() is available in Joomla via the JCacheStorage class itself. The class contains a __wakeup() method that calls JCache::getInstance(); if we can set a property that points to a JCacheStorage instance with a cache property containing a serialized object that calls system(), we get RCE.
A simple example (the exact gadget chain may vary depending on the Joomla core version, but the principle is the same):
<?php
// Gadget: JCacheStorage -> __wakeup() -> JCache::getInstance() -> unserialize()
// We create a nested object that ultimately calls system('id')
$payload = new stdClass();
$payload->cmd = 'id'; // property that will be used by the gadget
// Serialize the gadget chain
$serialized = serialize($payload);
// Wrap it in a JCacheStorage object so Joomla will unserialize it
$wrapper = new JCacheStorage();
$wrapper->cache = $serialized; // this will be unserialised later
// Final payload to send to the cache
$final = serialize($wrapper);The attacker can also use a pre‑built gadget chain from the public “PHP Object Injection” repository (e.g., Monolog\Handler\StreamHandler → __destruct() → system()), but the above demonstrates the core idea.
2.2 Delivering the payload
Assume the site has a component that accepts a cache_key and cache_data POST parameters and writes them to the cache. The attacker sends:
curl -X POST "https://target.com/administrator/index.php?option=com_mycomponent&task=saveCache" \
-d "cache_key=malicious" \
-d "cache_data=$final"If the component does not exist, the attacker can create a small malicious plugin that writes to the cache via JCache::store().
Important: The endpoint used above is illustrative. The real site may expose a different URL or require CSRF tokens. The attacker can discover the correct endpoint by inspecting the component’s source or by trial‑and‑error.
2.3 Triggering the gadget
When the cache is later read (e.g., by a page that uses the same cache key), Joomla will:
1. Load the cached file.
2. Strip the guard header from every occurrence (including the one inside the serialized payload).
3. Unserialize the remaining data → JCacheStorage instance.
4. JCacheStorage::__wakeup() is invoked → JCache::getInstance() → unserialises the nested payload → gadget chain executes system('id').
The attacker will see the output of the command in the response or in the server logs, proving RCE.
3. Post‑Exploitation
Once the attacker has RCE, the typical post‑exploitation steps are:
| Step | Action | Outcome |
|---|---|---|
| 3.1 | Deploy a webshell (e.g., <?php system($_GET['cmd']); ?>) | Persistent web‑based access |
| 3.2 | Escalate privileges | Use Joomla’s JAccess API to create a new admin user or modify an existing one. |
| 3.3 | Data exfiltration | Dump database credentials from #__users or #__configuration.php. |
| 3.4 | Pivot | Use the compromised host as a foothold for lateral movement within the network. |
Because the vulnerability requires a high‑privilege account to write to the cache, the attacker typically starts with a compromised admin credential (e.g., stolen via phishing or credential stuffing). Once inside, the attacker can use the cache injection to gain full RCE.
🌍 Real World Impact
| Impact | Explanation |
|---|---|
| Confidentiality (VC:H) | Arbitrary code execution allows reading of any file, including #__configuration.php, database dumps, or user data. |
| Integrity (VI:H) | The attacker can modify any file, inject malicious code, or tamper with database records. |
| Availability (VA:H) | The attacker can delete files, corrupt the cache, or crash the web application. |
| Scope (SC:H, SI:H, SA:H) | The vulnerability affects the entire Joomla installation, including all components, plugins, and extensions. |
| Exploitability (E:X) | No known public exploit, but the mechanics are straightforward for an experienced attacker. |
| Privileges Required (PR:H) | Requires a high‑privilege account (administrator). |
| User Interaction (UI:N) | No user interaction needed once the attacker has a high‑privilege account. |
| Attack Complexity (AC:L) | Low; the attacker only needs to craft a serialized payload and send it to a cache‑writing endpoint. |
Practical consequences
- Data breach: Sensitive user data, payment information, or intellectual property can be exfiltrated.
- Site takeover: Full control over the Joomla site, including the ability to create new admin users.
- Reputation damage: Public disclosure of a critical RCE can erode customer trust.
- Regulatory impact: Non‑compliance with GDPR, PCI‑DSS, or other data‑protection regulations if personal data is compromised.
🛡️ Remediation & Mitigation
1. Patch / Upgrade
| Affected | Minimum Safe Version |
|---|---|
| Joomla 1.5.0‑5.4.11 | Joomla 3.10.5 (or any 3.x ≥ 3.10.5) |
| Joomla 6.0.0‑6.2.1 | Joomla 4.3.0 (or any 4.x ≥ 4.3.0) |
Patch details
The official Joomla patch (released 2026‑12‑01) changes JCacheStorageFile::read() to remove only the leading guard header:
// Old code (buggy)
$data = str_replace('<?php die(\'Forbidden\'); ?>', '', $data);
// New code (fixed)
$data = preg_replace('/^<\?php die\(\'Forbidden\'\); \?>/', '', $data);Apply the patch or upgrade to the latest Joomla release.
2. Workarounds (if upgrade is not immediately possible)
| Mitigation | How to implement |
|---|---|
| Disable file caching | In the Joomla admin backend, go to *System → Global Configuration → System → Cache Settings* and set *Cache* to *No*. |
| Restrict cache directory | Ensure the cache directory (/cache/) is not web‑accessible (e.g., .htaccess deny all) and set permissions to 700 or 750. |
| Block serialized payloads | Add a ModSecurity rule to block requests containing serialized data: |
| | ```apache<br>Sec
[🤖 CVE Professor AI Security Engine]
FOFA Query