CVE-2026-96512 PUBLISHED

Sudo: sudo: tz environment variable allows bypass of notbefore/notafter time-based authorization

Assigner: redhat
Reserved: 23.09.2026 Published: 23.09.2026 Updated: 23.09.2026

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.

Metrics

CVSS Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS Score: 7.8

Product Status

Vendor Red Hat
Product Red Hat Enterprise Linux 10
Versions Default: affected
Vendor Red Hat
Product Red Hat Enterprise Linux 7
Versions Default: affected
Vendor Red Hat
Product Red Hat Enterprise Linux 8
Versions Default: affected
Vendor Red Hat
Product Red Hat Enterprise Linux 9
Versions Default: affected
Vendor Red Hat
Product Red Hat Hardened Images
Versions Default: affected

Workarounds

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'.

Credits

  • Upstream acknowledges Ermenson Junior (Independent security research) as the original reporter.

References

Problem Types

  • Incorrect Authorization CWE