CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2023-41892

Craft CMS RCE: The Art of Unauthenticated Object Injection

Alon Barad
Alon Barad
Software Engineer

Feb 26, 2026·6 min read·71 visits

Executive Summary (TL;DR)

Unauthenticated attackers can send a crafted HTTP POST request to Craft CMS versions 4.0.0 through 4.4.14 to execute arbitrary PHP code. This exploits a flaw in how the CMS handles user-supplied configuration arrays, turning a standard feature into a remote shell generator.

A critical remote code execution vulnerability in Craft CMS allows unauthenticated attackers to hijack the application's object instantiation logic. By manipulating the `ConditionsController`, attackers can trick the underlying Yii2 framework into creating arbitrary PHP objects with malicious configurations, leading to immediate server compromise via Guzzle or Imagick gadgets.

The Hook: Crafting Chaos

Craft CMS is the darling of the agency world. It’s slick, it’s flexible, and it’s built on top of the Yii2 framework. For the uninitiated, Yii2 is a powerful beast that relies heavily on "magic"—specifically, a dependency injection container that can instantiate classes and configure their properties on the fly using arrays. It’s a developer’s dream: define a class, throw an array of settings at it, and the framework handles the rest.

But here’s the thing about magic: if you let the wrong person wave the wand, things explode. In September 2023, researchers discovered that Craft CMS was a little too generous with who held the wand. Specifically, the ConditionsController allowed unauthenticated users to pass arbitrary configuration arrays directly into this object creation engine.

This isn't your standard buffer overflow or a forgotten SQL injection. This is Object Injection via Configuration. It’s the architectural equivalent of letting a stranger walk into a car factory, hand the foreman a blueprint for a tank, and having the factory build it without asking questions. The result? A CVSS 10.0 vulnerability that allows anyone on the internet to execute code on your server as www-data.

The Flaw: Trusting the Untrustworthy

The vulnerability lives in craft\controllers\ConditionsController.php. This controller is designed to handle dynamic conditions for content filtering. To do this, it needs to accept configuration data from the user to know what conditions to apply. So far, so standard.

The fatal mistake was in the beforeAction method. In Yii2, beforeAction runs before the main controller action. Craft CMS developers decided to process the request parameters here. They took the raw POST data, specifically a parameter named config, decoded it from JSON, and then—here is the kicker—passed it straight into the object creation service.

Because Yii2’s BaseObject allows for "Mass Assignment" (setting properties based on array keys), an attacker can control every public property of the class they ask to create. Even worse, Yii2 supports "behaviors" (keys starting with as ) and "events" (keys starting with on ). This means an attacker isn't just setting simple strings or integers; they can attach entire behavior classes or define event handlers that execute arbitrary PHP code.

The Code: The Smoking Gun

Let's look at the crime scene. In the vulnerable versions (<= 4.4.14), the code looked something like this:

// Vulnerable code in ConditionsController
public function beforeAction($action)
{
    // ... various checks ...
    
    // 1. Take user input blindly
    $config = $this->request->getBodyParam('config');
    
    // 2. If it looks like JSON, decode it
    if (is_string($config) && Json::isJson($config)) {
        $config = Json::decode($config);
    }
 
    // 3. Create the object using the user's config
    $condition = Craft::createObject($config);
    
    // ...
}

See the problem? There is zero validation on $config. If I send {"class": "\Evil\Class", "property": "bad_value"}, the application happily creates \Evil\Class.

The fix in version 4.4.15 was a multi-step remediation. First, they ensured the configuration is "cleansed" of dangerous keys like on (events) and as (behaviors). Second, they strictly typed the input. Third, and perhaps most importantly, they enforced authentication checks before this logic runs.

// Patched code
public function beforeAction($action)
{
    // Enforce permissions first!
    $this->requireCpRequest();
    
    // Sanitize the config
    $config = Craft::$app->getRequest()->getBodyParam('config');
    // ... decoding logic ...
    
    // Cleanse dangerous keys
    $config = Component::cleanseConfig($config);
    
    return parent::beforeAction($action);
}

The Exploit: Weaponizing Garbage Collection

So we can create objects. Great. But how do we get a shell? We need a "gadget"—a class already present in the codebase that does something dangerous. Since Craft CMS includes Guzzle (a popular HTTP client), we have a perfect candidate: \GuzzleHttp\Psr7\FnStream.

This class is a wrapper for PHP streams. It has a magic method, __destruct(), which is called when the object is destroyed (garbage collected) at the end of the script execution. The __destruct method in FnStream checks if a custom close function (_fn_close) is defined and, if so, executes it.

Here is the attack chain:

  1. Instantiate: Tell the controller to create a \GuzzleHttp\Psr7\FnStream object.
  2. Configure: Set the private property _fn_close to a string representing a PHP function, like phpinfo or system.
  3. Wait: The request finishes. PHP cleans up memory. The FnStream object is destroyed.
  4. Boom: __destruct() fires, calls call_user_func($this->_fn_close), and our code runs.

The payload looks remarkably simple for such a devastating exploit. A standard Nuclei template or Python script sends a POST request to index.php with:

{
  "action": "conditions/render",
  "config": {
    "class": "\\GuzzleHttp\\Psr7\\FnStream",
    "__construct()": [{"close": null}],
    "_fn_close": "phpinfo"
  }
}

If you see the PHP configuration page in the response, you own the server.

The Impact: Game Over

This is a full unauthenticated RCE. The attacker runs as the web server user (usually www-data). From here, the possibilities are endless and terrifying.

First, they can read your .env file, stealing your database credentials, AWS keys, and the CRAFT_SECURITY_KEY. With the database credentials, they can dump your entire user table, including hashed passwords. With the security key, they can forge session cookies or encrypt malicious payloads to be executed elsewhere.

Second, they can modify the CMS itself. They could inject a persistent backdoor into index.php that survives updates, or install a web shell deep in the vendor directory where you're unlikely to look. Ransomware gangs love these vulnerabilities because they are easy to automate. One script can scan thousands of servers, drop a cryptominer or encrypt the filesystem, and move on.

The Fix: Shutting the Door

If you are running Craft CMS 4.0.x through 4.4.14, you are vulnerable. Stop reading and update to 4.4.15 or higher immediately. The patch introduces strict validation on the config parameter, stripping out the magic keys that allowed the exploit to work.

After patching, you aren't done. You must assume you were compromised if your server was exposed to the internet.

  1. Rotate Keys: Change your CRAFT_SECURITY_KEY and any API keys stored in your .env file.
  2. Check Logs: Look for POST requests to index.php containing action=conditions/render or suspicious JSON payloads involving FnStream or Imagick.
  3. Verify Integrity: If possible, nuke the vendor folder and reinstall dependencies (composer install) to ensure no backdoors were planted in library files.

Official Patches

Craft CMSOfficial Changelog for 4.4.15

Fix Analysis (2)

Technical Appendix

CVSS Score
10.0/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:L
EPSS Probability
93.94%
Top 0% most exploited

Affected Systems

Craft CMS 4.0.0-RC1 through 4.4.14

Affected Versions Detail

Product
Affected Versions
Fixed Version
Craft CMS
Pixel & Tonic
>= 4.0.0-RC1, <= 4.4.144.4.15
AttributeDetail
CWE IDCWE-94 (Code Injection)
CVSS Score10.0 (Critical)
Attack VectorNetwork (HTTP POST)
EPSS Score0.93942 (99.88%)
Exploit StatusActive / Weaponized
Gadget UsedGuzzleHttp\Psr7\FnStream

MITRE ATT&CK Mapping

T1059Command and Scripting Interpreter
Execution
T1190Exploit Public-Facing Application
Initial Access
CWE-94
Improper Control of Generation of Code ('Code Injection')

Known Exploits & Detection

MetasploitMetasploit module exploiting the unauthenticated RCE via Guzzle gadget
GitHubPython PoC for Craft CMS RCE

Vulnerability Timeline

Patch released in Craft CMS 4.4.15
2023-07-03
CVE-2023-41892 assigned
2023-09-13
Full technical analysis and PoC published
2023-09-14
Metasploit module released
2023-12-14

References & Sources

  • [1]Calif.io Deep Dive Analysis
  • [2]GitHub Security Advisory

More Reports

•41 minutes ago•CVE-2026-88016
7.1

CVE-2026-88016: Arbitrary Filesystem Metadata Modification and Directory Traversal in rclone

CVE-2026-88016 is a high-severity directory traversal and arbitrary metadata modification vulnerability in rclone versions prior to 1.75.1. When synchronizing directories with the `--links` and `--metadata` flags, rclone fails to apply sandboxing to directory metadata operations, leading to symbolic link following that allows modification of arbitrary files outside the target destination.

Amit Schendel
Amit Schendel
2 views•7 min read
•about 2 hours ago•GHSA-M3WP-48JR-VR4G
7.5

GHSA-m3wp-48jr-vr4g: Unbounded Remote Media Fetch and Video Frame Expansion DoS in mistral.rs

An unbounded resource consumption and server-side request forgery (SSRF) vulnerability in mistral.rs allows remote, unauthenticated attackers to cause a denial of service (DoS) or execute SSRF attacks. The flaw exists in mistralrs-server-core due to unchecked remote media fetching, infinite stream buffering, and unbounded FFmpeg frame extraction.

Amit Schendel
Amit Schendel
3 views•8 min read
•about 3 hours ago•CVE-2026-86083
7.7

CVE-2026-86083: Sandbox Escape and Remote Code Execution via Code-Printer Injection in n8n Legacy Expression Engine

A critical sandbox escape vulnerability exists in the legacy expression engine of n8n. By leveraging Shared Builtin Tampering combined with Code-Printer Injection, an authenticated attacker can hijack the mutable global JSON.stringify function. This hijacking allows the attacker to inject arbitrary Node.js source code into internal execution contexts during code generation, escaping the isolated-vm sandbox and achieving full remote code execution on the host system.

Amit Schendel
Amit Schendel
4 views•6 min read
•about 4 hours ago•CVE-2026-87017
4.3

CVE-2026-87017: Broken Object-Level Authorization (BOLA) in Open WebUI Knowledge Search

A Broken Object-Level Authorization (BOLA) vulnerability exists in Open WebUI starting from version 0.7.0 up to (but not including) 0.11.1. The flaw resides in the platform's built-in knowledge search tool, which constructs metadata filters to scope database queries based on user permissions. However, eleven of the fifteen shipped vector database backends accepted these filters but silently ignored them, enabling authenticated users to retrieve and enumerate the metadata of inaccessible or private knowledge bases.

Alon Barad
Alon Barad
3 views•7 min read
•about 5 hours ago•CVE-2026-86076
8.7

CVE-2026-86076: Remote Code Execution via Expression Sandbox Escape in n8n

An expression sandbox escape vulnerability exists in n8n due to a missing AST traversal check on ClassBody in the PrototypeSanitizer. This allows authenticated users with low privileges to bypass property checks and achieve remote code execution.

Amit Schendel
Amit Schendel
3 views•7 min read
•about 6 hours ago•CVE-2026-86075
8.7

CVE-2026-86075: Unauthenticated Persistent Storage Exhaustion via OAuth Dynamic Client Registration Endpoint in n8n

In vulnerable configurations of n8n, the OAuth Dynamic Client Registration endpoint implements field size validation for redirect_uris but fails to enforce proper limits on client_name and grant_types. This allows an unauthenticated remote attacker to submit arbitrarily large values for these fields, leading to persistent database and disk storage exhaustion.

Alon Barad
Alon Barad
4 views•5 min read