ExpressionEngine <= 6.0.2 (Translate::save) PHP Code Injection Vulnerability
The Translate::save method in ExpressionEngine sanitises the filename but not the language parameter, allowing an attacker to write a PHP file into an arbitrary directory. An authenticated attacker could inject PHP code that executes on the server.
karmainsecurity.com
Published on karmainsecurity.com
The vulnerable code is located in the ExpressionEngine\Controller\Utilities\Translate::save() method:
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the $language parameter is concatenated into a file path without sanitisation, allowing directory traversal and writing a PHP file outside the intended languages directory.
What the attacker needed
Authenticated access to translation utility
The fix
The $language parameter should be sanitised the same way as $file, or validated against a whitelist of allowed language codes.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
ExpressionEngine is a content management system. A function that saves translation files took a folder name from the user without cleaning it, so someone logged in could make the site save a PHP script in a place where it would run. That gives the attacker control of the web server.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.