CVEfocus › CVE database › CVE-2026-96512

CVE-2026-96512Sudo: sudo: tz environment variable allows bypass of notbefore/notafter time-based…

CVSS 7.8 HighEPSS 0.2% (higher than 8% of CVEs)Published 2026-09-23Updated 2026-10-29Assigner: redhat

A flaw was found in sudo. When sudoers rules use NOTBEFORE or NOTAFTER time-based access restrictions with timestamps that omit the trailing 'Z' timezone indicator, the time evaluation relies on the TZ environment variable inherited from the calling user. Because sudo is a setuid-root program, an unprivileged local user can set TZ to an extreme timezone offset to shift the authorization window by up to approximately 25 hours, causing expired rules to be treated as valid. This allows the user to execute commands outside the intended time window. Authentication is not bypassed; only the time-based authorization check is affected.

CWE-863

What to do

Fixed builds are available from AlmaLinux, Alpine, Debian, Red Hat, Rocky Linux, Ubuntu: see the table below for the fixed version per release.

Debian, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

19Fixed
3Fix pending

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.04sudoFixed1.9.17p2-1ubuntu3.2UBUNTU-CVE-2026-96512
Ubuntu 24.04sudoFixed1.9.15p5-3ubuntu5.24.04.4UBUNTU-CVE-2026-96512
Ubuntu 22.04sudoFixed1.9.9-1ubuntu2.7UBUNTU-CVE-2026-96512
Ubuntu 20.04sudoFix pending1.8.31-1ubuntu1.5+esm2 (Ubuntu Pro)UBUNTU-CVE-2026-96512
Ubuntu 18.04sudoFix pending1.8.21p2-3ubuntu1.6+esm2 (Ubuntu Pro)UBUNTU-CVE-2026-96512
Debian 14sudoFixed1.9.17p2-9DEBIAN-CVE-2026-96512
Debian 13sudoFixed1.9.16p2-3+deb13u5DEBIAN-CVE-2026-96512
Debian 12sudoFix pendingDEBIAN-CVE-2026-96512
Red Hat Enterprise Linux 10sudoFixed0:1.9.17-10.p2.el10_2.7RHSA-2026:75579
Red Hat Enterprise Linux 10sudo-python-pluginFixed0:1.9.17-10.p2.el10_2.7RHSA-2026:75579
Red Hat Enterprise Linux 9sudoFixed0:1.9.17p2-3.el9_8.3RHSA-2026:75571
Red Hat Enterprise Linux 9sudo-python-pluginFixed0:1.9.17p2-3.el9_8.3RHSA-2026:75571
Red Hat Enterprise Linux 8sudoFixed0:1.9.5p2-2.el8_10RHSA-2026:75580
AlmaLinux 10sudoFixed1.9.17-10.p2.el10_2.7ALSA-2026:75579
AlmaLinux 10sudo-python-pluginFixed1.9.17-10.p2.el10_2.7ALSA-2026:75579
AlmaLinux 9sudoFixed1.9.17p2-3.el9_8.3ALSA-2026:75571
AlmaLinux 9sudo-python-pluginFixed1.9.17p2-3.el9_8.3ALSA-2026:75571
AlmaLinux 8sudoFixed1.9.5p2-2.el8_10ALSA-2026:75580
Rocky Linux 10sudoFixed0:1.9.17-10.p2.el10_2.7RLSA-2026:75579
Rocky Linux 9sudoFixed0:1.9.17p2-3.el9_8.3RLSA-2026:75571
Rocky Linux 8sudoFixed0:1.9.5p2-2.el8_10RLSA-2026:75580
Alpine Linux 3.24sudoFixed1.9.17_p2-r2ALPINE-CVE-2026-96512

What the vendor says

As published in the CVE record by redhat, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Workaround: Append the 'Z' timezone suffix to all NOTBEFORE and NOTAFTER timestamps in sudoers rules. For example, change 'NOTAFTER=20261231235959' to 'NOTAFTER=20261231235959Z'. Timestamps with the 'Z' suffix are interpreted as UTC via timegm() and are not affected by the TZ environment variable. Administrators can audit their sudoers configuration with: grep -rE 'NOT(BEFORE|AFTER)=' /etc/sudoers /etc/sudoers.d/ and verify that all timestamps end with 'Z'.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.