← back to blog
Threats & Exploits · Topic 11

A Failed Password Change Let Anyone Restore a Backup on Barracuda's Email Gateway, Then Run Commands as Root

CVE-2026-116606, a Barracuda Email Security Gateway pre-auth root chain, Threats and Exploits

You'd think a failed password change ends the request. On Barracuda's Email Security Gateway (ESG) it didn't. The code noted the error, handed back a low-privilege role and kept going, and that missing stop is the first link in a chain that gives an attacker root without a login.

The chain is CVE-2026-116606 plus CVE-2026-111560. Barracuda confirmed attacks on 9 November 2026 and CISA added both to its Known Exploited Vulnerabilities (KEV) catalogue on 10 November. By the end of this post you'll be able to explain each of the four steps, check your own appliances, and know what the patch changed. If you look after Barracuda kit, or you test Perl web apps, this one's for you.

Barracuda ESG pre-auth root chain: a failed password change lets a forged backup restore a timezone value that runs as root
What the appliance assumed, against what the chain actually did.

What the Barracuda ESG bugs are, and who's affected

Barracuda published both CVEs on 2 November 2026. Its advisory scores them like this:

Barracuda ESG CVEs at a glance
CVEBugCVSSProductsLogin needed?
CVE-2026-116606Authorisation bypass, lets you restore a backup9.3Email Security Gateway onlyNo
CVE-2026-111560OS command injection in the timezone setting8.6ESG, Load Balancer ADC, Message Archiver, WAF Control Center, WAF, Web Security GatewayYes, admin (on its own)

On ESG the bypass takes away the login you'd normally need for the injection, so the pair becomes pre-auth. On the other five products you'd still need an admin account. Barracuda labels the 9.3 as High in its advisory, though 9.3 sits in the Critical band of CVSS v4, which is how SecurityOnline lists it. I've used the band in the badge above.

One thing that confuses people: Barracuda says exploitation "requires an attacker to have access to the administrative interface". They mean network reach. You don't need a password at all: if you can load the admin web UI in a browser, you can run the chain.

Mandiant assigned the CVE records, and SecurityWeek, citing Mandiant's advisories, dates the reports to 15 October for the injection and 22 October for the bypass. Sina Kheirkhah of watchTowr Labs then diffed the patch and published a full root-cause write-up on 5 November, along with a "detection artefact generator" on GitHub. SecurityOnline points out that the script accepts any command you give it, so in practice it's a public proof of concept. Four days later, Barracuda confirmed "exploitation activity affecting a small number of organizations".

The chain in four steps

Here's the whole thing before we take it apart. Everything below comes from watchTowr's analysis, where they compared ESG build 9.4.0.027 with the fixed 9.4.0.029.

From an anonymous request to a root shell
01
Fail a password change

Send new_password and retype_password. The change fails, but the request isn't stopped.

▸
02
Reach the restore

Later handlers still run, including an upload handler that restores a backup.

▸
03
Forge the checksum

Backups are signed with a secret that's hard-coded in the product, so anyone can sign one.

▸
04
Timezone to root

The restored timezone value is pasted into shell commands, one run through sudo.

Stages as described by watchTowr Labs. MITRE ATT&CK: T1190 (exploit public-facing application), then T1059.004 (Unix shell).

Step 1: the password-change error path that doesn't stop

The ESG admin UI is Perl, served by one CGI entry point, /cgi-mod/index.cgi, with the code under /home/product/code/. Every request goes through a function called response in Index.pm, which calls _process_params early on.

If the request carries new_password and retype_password, _process_params calls Login::change_admin_password. When that comes back as ERROR_PASSWD_CHANGE, the code sets a flag to send a login response and returns $userrole. watchTowr found that for an anonymous visitor that's the low-privilege role the login screen uses.

And then response just carries on. The error's been noted, but nothing's ended the request, so every handler after it still runs for someone who never logged in. You'll see why that matters in a second.

It's a pattern you'll want to know on any test. Here's a cut-down Perl sketch of the shape (my illustration, not Barracuda's code):

# bug shape: error noted, request continues
if ($result eq ERROR_PASSWD_CHANGE) {
    $json_authenticate = 1;
    return $userrole;        # caller keeps processing
}

# fix shape: error ends the request
if ($result eq ERROR_PASSWD_CHANGE) {
    return _bailout_with_json_login_response();
}

The patch does the second one. It logs a failed_password_change event and returns through _bailout_with_json_login_response, which finishes the request there.

Step 2: reaching the backup restore handler

With the request still alive, the next useful handler is bayesian_upload_handler in bayesian_upload.pm. It takes the bayesian and pu_bayesian_upload parameters. Its permission check is perm { 1 }, a block that always says yes, so the low-privilege role from step 1 is enough. It's the same move as the PaperCut auth bypass: get past the gate once and an admin-only feature does the rest.

The handler saves the upload and passes it to Barracuda::Backup2::restore_all. That function untars the archive, reads backup.xml, calls restore_components and finishes with finalize_restore.

A backup is a tar file. One component, Spam_Config, holds a gzipped MySQL dump that gets loaded straight into the appliance's database. One of the rows in that dump is system_timezone. Keep that name in mind, it comes back in step 4.

This is the part Mandiant's description calls invoking "a configuration-import function" to "restore a crafted, compatible backup archive". Restoring a backup rewrites the whole global config, so even without step 4 it's a full takeover of the gateway's settings.

Step 3: the hard-coded checksum secret

The restore does check integrity. Each file's checksum is:

md5(file_bytes + CHECKSUM_SECRET + ".")

The trouble is that CHECKSUM_SECRET is a constant in the shipped code. If you've got a copy of the firmware, you can read it and sign your own backup. A secret that ships on every box isn't really a secret, and MD5 makes the signing step quick.

If you're building something that trusts backups, sign them with a key that's unique to the appliance, or better, use a real signature (HMAC with a per-device key at the very least) and refuse anything that doesn't match.

Step 4: the timezone command injection runs as root

Now the restored system_timezone value gets used. watchTowr found two places it reaches a shell.

The first is in Backup2.pm, inside finalize_restore. The code ran sed -i with Perl backticks and dropped the timezone value into the command string. It's wrapped in single quotes, but that won't help you when the value itself contains a quote. A value like Europe/London';id;' closes the quote, runs id and reopens it.

The second is fix_tz.pl, which writes the OS clock file /etc/sysconfig/clock. It runs through sudo, so whatever the timezone smuggles in runs as root. That's CVE-2026-111560, the same family of bug as the Nextcloud Collabora command injection, and because the same helper code ships in five other products, it's why the injection CVE covers more than ESG.

You can see the quoting problem safely on any Linux box. This is a toy, run it in a throwaway VM:

lab vm · quoting demo
$ tz="Europe/London';echo INJECTED;'" $ perl -e 'my $t=shift; print `echo '"'"'$t'"'"'`' "$tz" Europe/London INJECTED $ perl -e 'my $t=shift; system("echo", $t)' "$tz" Europe/London';echo INJECTED;'
Expected output, not captured from a Barracuda appliance. Backticks hand the string to a shell, the list form of system doesn't.

Barracuda's fix closes both sinks the same way. It checks that /usr/share/zoneinfo/<value> really exists before using it, and it edits the files with Perl's own read and write calls instead of a shell. An allow-list check like that is the right move for any value that should only ever be one of a known set.

Patch and check your Barracuda appliances

Barracuda pushes these as security patches. Its advisory lists one patch ID per product:

Barracuda patch IDs by product
ProductPatch
Email Security Gateway, 9.4.017 and laterBNSF-40425
Email Security Gateway, earlier than 9.4.017BNSF-40430
Load Balancer ADC and Web Application FirewallBNADC-16586
Message ArchiverBNMA-32468
WAF Control CenterBNWF-60060
Web Security GatewayBNYF-24789

The sources disagree on the fixed ESG build number. watchTowr compared 9.4.0.027 with 9.4.0.029, while The Hacker News and SecurityOnline say 9.4.0.030 and later. Barracuda's own page just says to run the latest firmware with all patches. So I'd check by patch ID first and treat the build number as a second check.

Then work through this list on each appliance:

  1. Confirm the right patch ID is applied. If auto-patching was switched off, apply it by hand and switch it back on. A box several versions behind may need more than one update.
  2. From a machine outside your network, try to load the admin UI. It should time out or be refused. If it loads, restrict it to a management network straight away.
  3. Check the configured timezone. It should be a plain zone name such as Europe/London. Quotes, semicolons or spaces in that field mean someone has been there.
  4. Look in the admin and web logs for configuration restores or Bayesian uploads you didn't do, especially from addresses that never logged in.
  5. If any of that turns up, you've got to treat the appliance as compromised and follow Barracuda support's guidance rather than just patching over it.
Patching stops new attacks. It does nothing about a root shell someone planted before you patched, so do steps 3 and 4 even on boxes that auto-patched.

Common mistakes with the Barracuda ESG patch

  • Reading "requires access to the administrative interface" as "requires a login". It means network reach. On ESG no password is needed.
  • Only patching ESG. The injection is in five other Barracuda products too. They need the admin login, but stolen or reused admin passwords are common.
  • Trusting auto-patch without checking. Barracuda's own advice is to verify the patch is on, and to apply it by hand if it isn't.
  • Going by build number alone. The reported fixed builds don't agree, so match the patch ID from the advisory.
  • Mixing this up with 2023. The UNC4841 campaign used CVE-2023-2868, a different bug. Old IOC lists for that one won't spot this.

Quick recap

  • CVE-2026-116606 (9.3) lets an anonymous request restore a backup on Barracuda ESG, because a failed password change didn't end the request.
  • Backups were signed with a hard-coded secret, so a forged one passes the check.
  • CVE-2026-111560 (8.6) puts the restored timezone value into shell commands, one through sudo, giving root.
  • Exploited in the wild per Barracuda on 9 November, in CISA KEV since 10 November.
  • Apply the patch ID for each product, get the admin UI off the internet, and check the timezone field and restore logs.

Go deeper

Read the watchTowr Labs write-up in full. It walks the actual Perl, and it's a good lesson in how a patch diff turns into a root cause in a few days. The error path that returns instead of stopping is one to look for in every app you test.

What I left out on purpose: the request layout, the secret's value and any working exploit steps. I also couldn't load CISA's alert pages while writing this, so the KEV date and 13 November deadline come from SecurityOnline and other press reports, and no source I read gave a CVSS vector, so there isn't one here.

If you're reviewing Barracuda appliances or hunting the same error-path pattern in other Perl apps, I'd be glad to swap notes on LinkedIn.

References

FAQ

What are CVE-2026-116606 and CVE-2026-111560?

Two Barracuda bugs published on 2 November 2026. CVE-2026-116606 (CVSS 9.3) is an authorisation bypass in the Email Security Gateway that lets an unauthenticated attacker restore a crafted backup. CVE-2026-111560 (CVSS 8.6) is a command injection in the timezone setting. Chained, they give root on the appliance.

Is the Barracuda ESG chain exploited in the wild?

Yes. Barracuda updated its advisory on 9 November 2026 to say it had seen exploitation affecting a small number of organisations, and CISA added both CVEs to the Known Exploited Vulnerabilities catalogue on 10 November with a 13 November deadline for federal agencies.

Which Barracuda products need patching?

The authorisation bypass affects only the Email Security Gateway. The command injection also affects Load Balancer ADC, Message Archiver, WAF Control Center, Web Application Firewall and Web Security Gateway, where it needs an admin login. Barracuda lists a separate patch ID for each product.

Does an admin UI that isn't on the internet keep me safe?

It lowers the risk a lot, because Barracuda says the attacker needs to reach the administrative interface. It isn't a fix on its own. Anyone already inside your network can still reach it, so apply the patch and check the firmware version as well.