Skip to content
RCE Write-up Intermediate

EspoCRM v9.3.4: From Extension Upload to Remote Code Execution (R

An administrator can upload an extension package containing a PHP script that the server runs during installation, with no validation or sandboxing. This lets an admin-level attacker run arbitrary PHP code and operating system commands on the server.

Ali İltizar Follow

Published on medium.com

In this article, I will detail an Authenticated Remote Code Execution (RCE) vulnerability I discovered in EspoCRM (<= v9.3.4). This flaw allows an attacker with administrative privileges to gain full control over the underlying operating system by bypassing traditional application boundaries through the extension…

Ali İltizar, on medium.com

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 extension installer executes a package-supplied install script without validation or sandboxing, so anyone allowed to upload extensions can run arbitrary code.

Impact

An attacker with admin rights could gain full control of the server, read configuration files including database credentials and encryption keys, plant backdoors and pivot into the internal network.

What the attacker needed

Administrator account on the CRM; ability to upload extensions

The fix

The vendor considers this expected behaviour, so the report recommends verifying extension signatures, allowing install hooks to be disabled, adding a restricted mode, and disabling extension uploads in high-security deployments.

How it was found

  1. Create a manifest and a malicious install script class.
  2. Zip the files into a standard extension package.
  3. Upload the package through the administration extensions panel.
  4. Click install so the server runs the script.

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.

EspoCRM is a customer relationship management web app. Administrators can add features by uploading extension packages, and one file inside such a package is run automatically when the extension is installed. Because that file is ordinary code the server executes, someone who can upload an extension can make the server run anything they want, including commands on the underlying machine.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by Ali İltizar

View all

4 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.