Auditing Acronis pre/post commands across a whole partner account after SEC-12645

Patching Acronis was only the first step. Here’s how we audited backup commands across our tenant tree and checked cPanel server logs for suspicious activity after SEC-12645—with scripts you can run yourself.

Share
Auditing Acronis pre/post commands across a whole partner account after SEC-12645

What happened

On 3 December 2026, Acronis published SEC-12645 (CVE-2026-87887). It's a high-severity information disclosure in the Acronis Backup plugin for cPanel & WHM and the Acronis Backup extension for Plesk. Acronis says it has already been exploited in the wild, in limited, targeted attacks against cPanel & WHM servers.

The advisory asks for more than an update. It also recommends checking for unexpected changes to protection plans and unknown pre/post commands in Backup Options.

That second part is the one that matters. Pre/post commands run on the protected machine, as root, every time a backup runs. Anyone who can edit your protection plans can make every server under that plan run their code at the next backup. So patching closes the hole, but only an audit tells you whether someone used it before you patched.

Patch first

Before auditing anything, close the hole. Per the advisory:

Product Affected Fixed in
Acronis Backup plugin for cPanel & WHM before 1.9.3.1031 1.9.3.1031
Acronis Backup plugin for cPanel & WHM 1.9.4 all builds so far no fix yet; downgrade to 1.9.3.1031
Acronis Backup extension for Plesk before 1.8.12-659 1.8.12-659

If you're on 1.9.4, Acronis gives this downgrade command (run as root):

rpm -Uvh --oldpackage 'https://dl.acronis.com/u/ci/cpanel/stable/rpm/acronis-backup-cpanel-1.9.3-1031.el7.x86_64.rpm'

To see what a cPanel server is running right now:

cat /usr/local/cpanel/base/3rdparty/acronisbackup/version

Why we didn't check plans by hand

At Fusioned, a large part of our cPanel fleet had the plugin on build 1.9.3.1021, so we were squarely in scope. Updating the servers to 1031 was the easy part. The audit was harder.

Our Acronis partner account isn't flat. There are partner tenants nested under partner tenants, dozens of customer tenants, and units under some customers. Each cPanel or Plesk server has its own protection plan, often created inside a unit rather than the customer itself.

Checking pre/post commands in the console means opening every customer, every plan and every Backup Options panel, one at a time. Across dozens of plans that's slow and easy to get wrong, and you'd have to do it all again next time. So we did it through the API instead.

The script

export-prepost-commands.mjs is a single Node.js file with no dependencies to install. It started as a pre/post command export and grew into a read-only audit of the whole Acronis account: every pre/post command, every protection plan and when it last changed, every restore job, and every API client. Get it from the gist.

What it does:

  • Walks the whole tenant tree. It starts at the tenant your API client belongs to and works down level by level. That includes nested partner tenants, folders, customers and units, down to the last customer. Each row records which reseller (partner tenant) it sits under, so multi-level accounts stay readable.
  • Queries every customer and every unit. We found that plans belong to the exact tenant they were created in, which is usually a unit under the customer. Asking the policy API about the customer alone misses those, so the script asks about each tenant separately.
  • Finds every command. It reads each plan with its settings and collects every pre_post_commands entry: pre_command, post_command, pre_data_command and post_data_command, enabled or not.
  • Shows when each plan last changed. It takes the newest change across every part of a plan. A plan that had a command added and then removed still shows that change, even though its settings look clean today.
  • Lists every API client. For each one it records the tenant, the type, and when and from which IP it was last used, where Acronis records that.
  • Is read-only. The only non-GET request is the one that gets an access token. It never changes a plan, tenant or agent, and it won't follow redirects, so your credentials are never sent anywhere else.
  • Copes with large accounts. It pages through results, waits and retries on rate limits (HTTP 429) and server errors, and gets a new token if the current one expires partway through.

Each run writes to its own folder, so earlier exports are never overwritten:

probe/export-<timestamp>/
  prepost-commands.csv     every pre/post command, one row each
  prepost-commands.json    the same, plus any tenants that failed
  plans.csv                every protection plan: created, last changed, owning API client
  restores.csv             every restore job the plugin created
  api-clients.csv          every API client, with when and where it was last used
  policies/                raw plan JSON per tenant, for digging deeper

Two options narrow it down. --since=2026-10-01 limits plans.csv and restores.csv to changes on or after that date (UTC), and --only=commands or --only=clients runs just one half. prepost-commands.csv always lists every current command, whatever --since says.

Running it

You need Node.js 20.12 or newer (node --version), the script from the gist, and an Acronis API client.

1. Create an API client

Log in to the Acronis Cyber Protect Cloud management portal as an administrator of the tenant you want to audit. To cover everything, use your top-level partner tenant: the script only sees tenants below the one the API client belongs to.

Go to Settings → API clients (1) and click Create API client (2).

Settings → API clients in the Acronis management portal

Give it a name you'll recognise later, such as pre-post-commands, and click Next. As the dialog says, the API client gets the same privileges as your account, so treat its secret like an admin password.

Naming the new API client

The last step shows the Client ID, Secret and Data center URL. Copy all three now: you can't view the secret again once you close this dialog.

Client ID, secret and data center URL

2. Create the .env file

In the same folder as export-prepost-commands.mjs, create a file called .env and paste in the three values:

ACRONIS_BASE_URL=
ACRONIS_CLIENT_ID=
ACRONIS_CLIENT_SECRET=
.env variable Value from the Create API client dialog
ACRONIS_BASE_URL Data center URL, for example https://eu2-cloud.acronis.com
ACRONIS_CLIENT_ID Client ID
ACRONIS_CLIENT_SECRET Secret

Lock the file down with chmod 600 .env, and never commit it to a repository.

3. Run it

node export-prepost-commands.mjs

For an audit after an advisory, add --since with a date a few weeks before you patched:

node export-prepost-commands.mjs --since=2026-10-01

It prints the size of the tree, one line per tenant that has plans, the protection plans that changed since that date, and then the API clients:

Root: Example Partner (…): 2 resellers, 40 customers, 55 customer/unit tenants
  [Example Partner 1a2b3c4d] Example Customer: 3 plans, 6 pre/post commands
  …

Protection plans changed since 2026-10-01: 3 of 68
  2026-11-20 13:29:09Z  Example Hosting / Hosting panel - CPANEL - cpanel03.example.com  [Instance ID: …]
  2026-10-24 08:50:41Z  Example Customer / Hosting panel - CPANEL - cpanel01.example.com  [Instance ID: …]
  2026-10-24 08:49:26Z  Example Customer / Hosting panel - CPANEL - cpanel02.example.com  [owner client deleted (404)]
Restore jobs since 2026-10-01: 12

120 plans scanned; 36 plans have 72 pre/post commands; 0 tenants failed.
Wrote probe/export-…/prepost-commands.csv, prepost-commands.json, plans.csv (3 protection plans) and restores.csv (12 restore jobs)

  [Example Partner 1a2b3c4d] Example Partner (partner): 4 API clients
  …

19 API clients in 81 tenants; 0 tenants failed.
Wrote probe/export-…/api-clients.csv and probe/export-…/api-clients.json

If any tenant fails, it's listed on screen and in the JSON file, and the run carries on with the rest. Re-run the script for those once the cause is fixed.

Reading the results

On a cPanel or Plesk server protected by the Acronis plugin, a normal plan has exactly two entries. The plugin sets these itself:

command_type cmd args
pre_data_command /usr/lib/Acronis/BackupAndRecovery/webcpprecapture {RESOURCE_ID}
post_data_command /usr/lib/Acronis/BackupAndRecovery/webcppostcapture {RESOURCE_ID}

To hide those and see only what's left, filter on the command and its argument together:

grep -v -E '"/usr/lib/Acronis/BackupAndRecovery/webcp(pre|post)capture","\{RESOURCE_ID\}"' \
  probe/export-*/prepost-commands.csv

Every row that remains needs an explanation. Things to look at:

  • Commands you didn't add. Any pre_command or post_command on a plan where nobody on your team set one.
  • Inline shell. bash -c, sh -c, curl, wget, base64, pipes, or a URL in the args.
  • Odd paths. Scripts in /tmp, /dev/shm, /var/tmp or under a user's home directory, or an unusual workdir.
  • Your own scripts. A custom script you configured years ago is fine in the plan, but the risk is in its contents. Check on the server that it's still what you wrote: contents, owner and modification time.
  • Disabled entries. They don't run, but an entry you never created means someone else edited the plan.

In our export, every plan had only the standard pair, plus one custom MySQL pre-command script we had set up ourselves.

Look at what changed, not just what's there

The pre/post commands show your plans as they are now. An attacker could add a command, wait for one backup to run, and put the plan back. plans.csv is how you catch that: it lists every protection plan, most recently changed first.

Start with the plans that changed in the weeks before you patched. Most changes have an ordinary explanation:

  • A plan per server. We saw the plugin move servers off an older shared plan onto their own Hosting panel - CPANEL - <hostname> plan. The old plan is updated and the new one created within seconds of each other.
  • A re-registered server. Re-registering the plugin creates a new API client, but the plan keeps its old owner, which then shows as "owner client deleted (404)". That's expected, not a red flag.
  • Several customers' plans changed within the same few minutes. That needs one actor with partner-level access, which usually means you: a fleet-wide plugin update or a bulk edit in the console.

For anything you can't explain, open the audit log in the management portal at that exact time. It shows who made the change, and that's what clears or confirms a plan.

restores.csv lists every restore job the plugin started, newest first. A burst of restores nobody asked for is worth a closer look.

api-clients.csv lists every API client in every tenant. Delete any you don't recognise. The last-used time and IP are useful for clients you created yourself. For the plugin's own per-server clients Acronis doesn't record them reliably, so don't read anything into an old or empty date there.

Check your cPanel servers too

The plan export covers the cloud side. On each server, the plugin keeps its own evidence. Its backend service, which the Acronis pages in cPanel and WHM talk to, logs every request along with the Unix user that made it. It keeps about two months of these logs.

acronis-plugin-log-check.py, also in the gist, reads those logs alongside cPanel's own access_log. It lists requests from hosting accounts that don't line up with that account using the Acronis pages at the time. It only reads files, and it also tells you whether the installed plugin version is vulnerable.

Run it as root on each cPanel server:

python3 -I acronis-plugin-log-check.py

If python3 isn't installed, use the Python that ships with the plugin:

/usr/local/cpanel/base/3rdparty/acronisbackup/python/bin/python3 -I acronis-plugin-log-check.py

A clean server looks like this:

=== cpanel01.example.com
plugin version: 1.9.3.1031 (fixed)
access_log coverage: 2026-10-01 00:00:12 .. 2026-12-04 15:58:40
service log window: 2026-10-05 00:00:03 .. 2026-12-04 15:58:41 (61 files)

user               requests  matched no-cover  FLAGGED
exampleshop             84       84        0        0
agencyreseller         212      212        0        0

RESULT: nothing flagged in the logs above.

How to read it:

  • matched: requests made while that account was using the Acronis pages. That's normal.
  • no-cover: requests older than your access_log history, so the script can't judge them either way.
  • FLAGGED: requests from an account that wasn't using the Acronis pages at the time. Start with that account: look for webshells, cron jobs you don't recognise and recently changed files. Then review the protection plans and audit log for that customer in Acronis.

A clean result covers the logs that exist, roughly the last two months. It says nothing about older activity, or about a server where an attacker already had root and could edit the logs.

What a clean export doesn't tell you

plans.csv tells you when a plan changed, but not who changed it or what it looked like in between. To cover that:

  • Check the audit log. In the management portal, look for protection plan changes in the weeks before you patched, especially any you can't match to someone on your team.
  • Check activities per machine. Look for backups with unexpected command output or failures around the same dates.
  • Look beyond plans. Leaked credentials can also be used to browse, download or delete backups. That shows up in the audit log, not in plan settings.
  • Clean up after yourself. When the audit is done, delete the API client you created for it, or store its secret somewhere safe if you plan to re-run the script regularly.

Don't let one backup vendor be your only copy

SEC-12645 is also a reminder of where backup software sits. It runs as root on every server it protects, and it holds credentials to the place your backups live. Anyone who can edit your plans can probably also browse or delete your recovery points. If that tool is your only copy, one bug in it puts both production and the backups at risk.

At Fusioned, every managed cloud and dedicated server runs two independent backup systems by default: Acronis Cyber Protect as the primary and JetBackup as the secondary. A problem in one doesn't touch the other.

If you're relying on a single vendor today, a second copy doesn't need to be elaborate. Choose a different product, use different credentials and a different storage target, and test a restore from it before you need one.

Wrapping up

The script takes minutes to run, so it's worth re-running after changes to your plans, not just after an advisory. Grab it from the gist, and if you find something interesting with it, I'd like to hear about it.

Read more