On this page (6 sections)

Ubuntu published USN-8895-2 on 12 November 2026. It brings a Sudo fix to Ubuntu 18.04 LTS and Ubuntu 20.04 LTS, matching the earlier USN-8895-1, which addressed the same vulnerability. Ubuntu summarizes the impact as a local user being able to bypass time-based access restrictions.

If your Linux servers use sudoers rules that limit when an account may use elevated rights, this deserves a few minutes of your time. If you have no time-based rules, the exposure Ubuntu describes does not appear to apply, though the update is still routine to install.

What happened

Ubuntu's notice says Sudo mishandled time-based restrictions in one specific situation: sudoers rules that use NOTBEFORE or NOTAFTER and write the timestamp without a trailing timezone indicator. In that case, a local attacker could possibly run commands outside the intended window by changing the TZ environment variable.

USN-8895-2 carries the USN-8895-1 fix over to 18.04 LTS and 20.04 LTS. The notice does not name who found the issue, does not give a severity rating, and says nothing about exploitation in the wild. Only Ubuntu's own notice covers this so far, so treat anything beyond it as unconfirmed.

Technical details in plain terms

Sudo reads a sudoers file that defines who may run which commands. Rules can also carry a validity period through NOTBEFORE and NOTAFTER, which suits contractors, on-call staff or short maintenance windows.

Ubuntu's description is narrow. The trigger is a time limit written without a trailing timezone indicator, and the possible abuse is a local user manipulating TZ to act outside the window. The notice offers no deeper technical detail.

Our inference, not stated by Ubuntu: a timestamp with no timezone may be interpreted using the process's timezone setting, which a local user can often influence through their own environment. That would explain why TZ is involved, but treat it as a reading of the summary rather than a confirmed mechanism.

The notice describes a local attacker, so it is not presented as a remote, unauthenticated issue. It does not spell out which accounts could benefit; the practical concern is accounts whose elevated access is meant to be limited by time.

Who is affected

  • Ubuntu 20.04 LTS (focal) and 18.04 LTS (bionic) hosts with the sudo or sudo-ldap package, the packages named in the notice.
  • Systems whose sudoers rules use NOTBEFORE or NOTAFTER with timestamps that omit the trailing timezone indicator.
  • Shared servers, jump hosts and hosting environments where several people hold local accounts and time-limited elevated access.

Single-user servers with no time-limited rules are unlikely to be affected by this specific issue. The notice lists the fixed packages with +esm version strings and marks them as available with Ubuntu Pro. Ubuntu states that Pro is free for up to five machines.

How to check your exposure

Start by finding out whether any rules use time limits. This read-only search covers the main sudoers file and drop-in files for the two keywords. Run it as root; any output means you have time-based rules worth reviewing.

Search sudoers files for time-based rules (run as root on Ubuntu)Shell
grep -rnE 'NOTBEFORE|NOTAFTER' /etc/sudoers /etc/sudoers.d/

Then list the installed Sudo package versions and compare them with the fixed versions in the table below. Packages that are not installed will be reported as such.

Show installed sudo package versions (Ubuntu 18.04 / 20.04)Shell
dpkg -l sudo sudo-ldap
Fixed package versions listed in USN-8895-2
Ubuntu releasePackageFixed version
20.04 LTS (focal)sudo, sudo-ldap1.8.31-1ubuntu1.5+esm2
18.04 LTS (bionic)sudo, sudo-ldap1.8.21p2-3ubuntu1.6+esm2

If a rule shows a timestamp without a trailing timezone indicator, it matches the condition the notice describes.

What to do now

  1. Run the grep above to find sudoers rules using NOTBEFORE or NOTAFTER.
  2. Check the installed sudo version with dpkg and compare it with the fixed versions.
  3. Attach the machine to Ubuntu Pro if it is not already, since the notice lists the fixes for 18.04 and 20.04 as available with Ubuntu Pro.
  4. Apply the update with your normal package tooling and confirm the new version.
  5. Review time-limited rules and remove any that are stale.
  6. Review who has local shell accounts on affected servers and remove accounts that are no longer needed.

Ubuntu says a standard system update makes the necessary changes. On a machine already enrolled in Ubuntu Pro, the command below upgrades only the Sudo packages; afterwards, rerun the dpkg check to confirm the version.

Update the sudo packages (Ubuntu 18.04 / 20.04 with Ubuntu Pro enabled)Shell
sudo apt update && sudo apt install --only-upgrade sudo sudo-ldap
If sudo-ldap is not installed on your system, apt may report that and only upgrade the sudo package. That is expected.
Tip. Until you can patch, one cautious step is to write NOTBEFORE and NOTAFTER timestamps with an explicit timezone indicator, since the notice ties the problem to timestamps that omit it. This is our suggestion based on the trigger condition, not an official workaround, so test it on a non-production host first.

Detection and monitoring

The notice describes no indicator of compromise. A reasonable approach is to look for sudo use by time-limited accounts outside the windows your rules allow. On Ubuntu, sudo activity is commonly written to the authentication log. The command below shows the last 100 matching entries; compare their times with your intended windows.

List recent sudo log entries (Ubuntu, run as root)Shell
grep 'sudo:' /var/log/auth.log | tail -n 100

Look for entries by time-limited users outside their allowed hours. Log retention and rotation vary by system, so an empty or short result is not proof that nothing happened.

Local privilege issues seldom matter on their own, but they raise the impact of any foothold an attacker gains elsewhere, for example through a vulnerable web application. For the web-facing side of your servers, Webforta Scan offers read-only checks of sites you verify, and our guides on small business website security and what to do if your website is hacked cover wider hygiene. An outside-in scan cannot see local sudoers settings on a host.

Sources

This article is based on the public sources below. Details can change as vendors and researchers publish more; check the original advisories before acting on version numbers.

  1. USN-8895-2: Sudo vulnerability | Ubuntu security notices | Ubuntuubuntu.com ·
  • sudo
  • Ubuntu
  • USN
  • Linux hardening
  • sudoers