CVE-2026-96512
sudo: sudo: TZ environment variable allows bypass of NOTBEFORE/NOTAFTER time-based authorization
Severity
ImportantRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · September 23, 2026
Updated · October 30, 2026
Description
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.
Statement
This vulnerability is rated as Important severity because a local authenticated user can bypass time-based sudoers restrictions and execute privileged commands outside the configured validity window. Exploitation requires a sudoers rule with NOTBEFORE or NOTAFTER timestamps that omit the trailing 'Z' suffix, and the attacker must be the subject of such a rule. This is an optional feature not enabled in default configurations. PAM authentication is unaffected; the attacker cannot gain access beyond what the sudoers rule already grants. Sudo calls unsetenv("TZ") and tzset() early in startup as a partial defense, but upstream accepted and fixed the vulnerability, indicating this control is insufficient on at least some platforms. Red Hat ships sudo in all supported RHEL versions (RHEL 7 through RHEL 10 and RHIVOS). Red Hat product impact analysis for specific streams is pending affect filing.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
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'.
CVSS / CWE
CVSS 3.1 · 7.8CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CWE-863 · Incorrect Authorization