View all Worklets
LinuxLinux

Disable DIGEST Authentication in Apache Tomcat to Mitigate CVE-2026-43512 on Linux

Disables DIGEST authentication in Apache Tomcat web.xml files on unpatched Linux servers to mitigate the CVE-2026-43512 login bypass

Worklet Details

What the Tomcat DIGEST authentication Worklet does

This Automox Worklet™ disables DIGEST authentication in Apache Tomcat deployment descriptors on Linux servers as a mitigation for CVE-2026-43512. It changes <auth-method>DIGEST</auth-method> to <auth-method>NONE</auth-method>, then restarts the systemd unit that runs Tomcat so the server loads the new value. It changes a file only when a Tomcat build serving that file is a known affected build.

The Worklet looks for Tomcat instances in package layouts under /usr/share/tomcat*, /var/lib/tomcat*, /var/lib/tomcats/, and /etc/tomcat*, and in tarball installs under /opt/tomcat*, /opt/apache-tomcat*, /usr/local/tomcat*, /usr/local/apache-tomcat*, and /srv/tomcat*. It also reads the -Dcatalina.base path of each running Tomcat JVM and follows the docBase and appBase paths set in each instance's server.xml and per-host context files. In each instance, it checks every WEB-INF/web.xml and WEB-INF/tomcat-web.xml plus the global conf/web.xml.

For the Red Hat, JBoss Web Server, Debian, and Ubuntu releases in its version table, the Worklet compares the installed package with the vendor's published fixed version. That covers backports such as 9.0.58-1ubuntu0.2+esm4 for tomcat9 on Ubuntu 22.04, which carry the fix under an older upstream number. RHEL 7 tomcat, JBoss Web Server 5, and tomcat11 on Ubuntu 25.10 and 26.04 have no vendor fix, so the Worklet treats them as affected. For a tarball install, it reads the version from RELEASE-NOTES and compares it with the upstream fixed releases 9.0.118, 10.1.55, and 11.0.22.

Why disable DIGEST authentication for CVE-2026-43512

CVE-2026-43512 is an authentication bypass in Tomcat's DIGEST authenticator. Any user unknown to the configured Realm can sign in to a DIGEST-protected webapp with the password "null". Apache rates the flaw Moderate and lists Tomcat 11.0.0-M1 through 11.0.21, 10.1.0-M1 through 10.1.54, 9.0.0.M1 through 9.0.117, 8.5.0 through 8.5.100, and 7.0.0 through 7.0.109 as affected. Tenable's Nessus plugin 314488 rates it Critical, based on a CVSS 3 base score of 9.8.

Upgrading to Tomcat 11.0.22, 10.1.55, or 9.0.118, or to your distribution's patched package, is the permanent fix. Red Hat's mitigation is to disable DIGEST authentication and restart the service. This Worklet sets the auth-method to NONE and restarts systemd-managed Tomcat services. Use this Worklet when a Tomcat upgrade has to wait for application testing or a change window.

How the DIGEST-to-NONE change works

  1. Evaluation phase: Runs the discovery above and looks for an <auth-method> element that holds DIGEST outside XML comments. The match allows surrounding whitespace and a CDATA wrapper. For each match, it checks the Tomcat runtime behind the file with rpm for Red Hat and JBoss Web Server packages, dpkg-query for Debian and Ubuntu packages, or the RELEASE-NOTES file for tarball installs.

    Evaluation exits 1 (non-compliant) when live DIGEST sits on a known affected build. It also exits 1 when a file the Worklet already set to NONE still needs a Tomcat restart. That's the case when the serving JVM started before the edit and remediation can restart it. It exits 0 (compliant) when the server has no Tomcat descriptors, no live DIGEST, or only fixed runtimes.

    When it can't determine the Tomcat version behind a file, it logs a WARN, schedules no change, and doesn't count that file as non-compliant. The WARN line asks you to confirm the version manually.

  2. Remediation phase: Repeats the same discovery and selects the same files. It copies each one to /var/lib/automox/workletcache/c1f0704d-4d18-54b8-a675-d8293c50e731/ and records the path in manifest.txt there. It then replaces DIGEST with NONE in place and leaves commented-out blocks untouched.

    Next, the Worklet confirms that no live DIGEST remains and that the file is well-formed. That check uses xmllint --noout --nonet. Without xmllint, it compares tag and comment counts with the backup. The Worklet restores a file that fails either check from its backup.

    The Worklet then runs systemctl restart on the systemd unit that owns each running Tomcat JVM serving a changed file. It also restarts any JVM still running from before an earlier edit. It waits up to 30 seconds for the old JVM to exit, the unit to report active, and a new JVM to start for the same catalina.base. Remediation exits 0 when every edit and restart succeeds and exits 1 when any fails.

Tomcat DIGEST mitigation requirements

  • A Linux server running Apache Tomcat on RHEL or CentOS 7 or later, Rocky Linux 8 or later, Ubuntu 16.04 or later, or Debian

  • GNU coreutils, sed, grep, find, ps, and awk, plus rpm or dpkg-query for package version checks and systemctl for restarts. xmllint is optional.

  • Root privileges through the Automox agent to edit descriptors, write backups under /var/lib/automox/workletcache/, and restart services

  • Tomcat running as the main process of a systemd service, or through the systemd-sysv wrapper for an /etc/init.d/tomcat* script, for automatic restarts. If Tomcat runs some other way, or its unit also runs the Automox agent, remediation logs "Manual Tomcat restart required" and exits 1. Restart that Tomcat yourself to load the change.

  • A maintenance window, since restarting Tomcat briefly interrupts service

  • Another authentication method, such as BASIC or FORM, ready for each webapp that used DIGEST. Protected pages in those webapps return HTTP 403 while the auth-method is NONE.

  • Optional dryrun=yes to log each file the Worklet would back up and change, plus a summary of the restarts, without modifying anything

  • Optional rollback=yes to restore the backed-up descriptors listed in manifest.txt and restart the Tomcat services serving them. Rollback skips a file whose content changed after the Worklet edited it, such as a redeployed webapp. It exits 1 if the manifest or a backup file is missing.

  • A manual policy run for rollback. Scheduled runs skip remediation on servers that report compliant. A manual run goes straight to remediation. For a server still on an affected build, first remove the server's group from the original policy so its next scheduled run doesn't set the auth-method back to NONE.

Expected Tomcat authentication behavior after remediation

After a successful run, each descriptor the Worklet selected has NONE as its auth-method. Each running Tomcat that serves one of those files has restarted under systemd and loaded the new value. NONE selects Tomcat's NonLoginAuthenticator. Requests to protected areas of those webapps return HTTP 403 to every user until you configure another authentication method.

Servers without Tomcat, without live DIGEST, or with a fixed build report compliant and stay unchanged, as do servers with an unknown Tomcat version behind a DIGEST file. A Tomcat instance that isn't running picks up the edited descriptor at its next start. Each run writes timestamped lines to the Activity Log for every file it changes and every service it restarts. After you upgrade Tomcat, create a policy for the server's group with rollback=yes set in its remediation code, and run it with Run Policy to restore your original DIGEST configuration from the backups in /var/lib/automox/workletcache/c1f0704d-4d18-54b8-a675-d8293c50e731/.

View in app

Consider Worklets your easy button

What's a Worklet?

An Automox Worklet™ is a Bash or PowerShell automation that takes action on Windows, macOS, and Linux endpoints at scale. It handles everything from configuration and software management to named-CVE mitigations deployed within hours of disclosure, including vulnerabilities that have no patch yet, are configuration-based, or that a vendor won't fix.

Every Automox-published Worklet is human-reviewed, and customers control where, when, and how it runs.

Mitigation at AI speed

Disclosure to mitigation in minutes or hours

Frontier-model AI is finding vulnerabilities faster than most teams can track, and most of what it finds isn't immediately patchable. Finding isn't fixing. Worklets turn discovery into action.

  • Search by CVE or browse the Mitigations category
  • Review the Worklet before you deploy it
  • FixNow for urgent exposure
  • Verify execution through Activity Log and Policy Results
Mitigating Vulnerabilities with Automox