CVE-2026-96512

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

Published Sep 23, 2026 CVSS 3.1 · 7.8 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

A flaw in sudo allows an unprivileged local user to set the TZ environment variable to an extreme offset when sudoers rules use NOTBEFORE or NOTAFTER timestamps lacking a trailing 'Z'. Because the setuid-root sudo process interprets these times relative to the inherited TZ, an attacker can shift the authorization window by up to approximately 25 hours, treating expired rules as still valid. This bypass lets the user run commands outside the intended time window, effectively granting them elevated privileges for a period that should have been forbidden, although the authentication mechanism itself remains intact.

Affected Systems

The vulnerability impacts Red Hat Enterprise Linux versions 10, 9, 8, and 7 as well as the Red Hat Hardened Images (Hummingbird) distribution. All systems running sudo with time‑based restrictions in their sudoers files without a 'Z' suffix on the timestamps are at risk, regardless of the specific sudo version installed.

Risk and Exploitability

With a CVSS score of 7.8, the flaw represents a high severity vulnerability. The EPSS score is not available, but the simplicity of setting TZ and the local nature of the attack make exploitation likely in compromised environments. Although the vulnerability is not currently cataloged in CISA KEV, its potential for local privilege escalation warrants immediate attention. An attacker only needs local shell access to set TZ before invoking sudo; no remote privileges are required.

Remediation

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


OpenCVE Recommended Actions

  • Apply the vendor-published patch for CVE‑2026‑96512 to upgrade sudo to the fixed version.
  • As a temporary measure, modify every NOTBEFORE and NOTAFTER entry in /etc/sudoers and /etc/sudoers.d to include a trailing 'Z' so timestamps are interpreted as UTC via timegm().
  • Audit your sudoers configuration to confirm all time‑based rules end with 'Z'; run grep -rE 'NOT\(BEFORE|AFTER\)=' /etc/sudoers /etc/sudoers.d to locate any non‑compliant entries.

Generated by OpenCVE AI on September 23, 2026 at 15:23 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Ubuntu USN Ubuntu USN USN-8895-1 Sudo vulnerability
Ubuntu USN Ubuntu USN USN-8895-2 Sudo vulnerability
History
Type Values Removed Values Added
First Time appeared Redhat openshift Ai
CPEs cpe:/a:redhat:openshift_ai:3.0::el9
cpe:/a:redhat:openshift_ai:3.4::el9
Vendors & Products Redhat openshift Ai
References
Type Values Removed Values Added
First Time appeared Redhat rhel Els
CPEs cpe:/o:redhat:enterprise_linux:7 cpe:/o:redhat:rhel_els:7
Vendors & Products Redhat rhel Els
References
Type Values Removed Values Added
CPEs cpe:/o:redhat:rhel_aus:8.6::baseos
cpe:/o:redhat:rhel_eus_long_life:8.6::baseos
References
Type Values Removed Values Added
First Time appeared Redhat rhel Aus
Redhat rhel Eus Long Life
CPEs cpe:/o:redhat:rhel_aus:8.4::baseos
cpe:/o:redhat:rhel_eus_long_life:8.4::baseos
Vendors & Products Redhat rhel Aus
Redhat rhel Eus Long Life
References
Type Values Removed Values Added
CPEs cpe:/a:redhat:rhel_e4s:9.2::appstream
cpe:/o:redhat:rhel_e4s:9.2::baseos
References
Type Values Removed Values Added
First Time appeared Redhat enterprise Linux Eus
CPEs cpe:/o:redhat:enterprise_linux_eus:10.0
Vendors & Products Redhat enterprise Linux Eus
References
Type Values Removed Values Added
First Time appeared Redhat rhel Tus
CPEs cpe:/o:redhat:rhel_e4s:8.8::baseos
cpe:/o:redhat:rhel_tus:8.8::baseos
Vendors & Products Redhat rhel Tus
References
Type Values Removed Values Added
First Time appeared Redhat rhel E4s
CPEs cpe:/a:redhat:rhel_e4s:9.4::appstream
cpe:/o:redhat:rhel_e4s:9.4::baseos
Vendors & Products Redhat rhel E4s
References
Type Values Removed Values Added
First Time appeared Redhat rhel Eus
CPEs cpe:/a:redhat:rhel_eus:9.6::appstream
cpe:/o:redhat:rhel_eus:9.6::baseos
Vendors & Products Redhat rhel Eus
References
Type Values Removed Values Added
First Time appeared Redhat rhui
CPEs cpe:/a:redhat:rhui:5::el9
Vendors & Products Redhat rhui
References
Type Values Removed Values Added
CPEs cpe:/o:redhat:enterprise_linux:9 cpe:/a:redhat:enterprise_linux:9::appstream
cpe:/o:redhat:enterprise_linux:9::baseos
References
Type Values Removed Values Added
CPEs cpe:/o:redhat:enterprise_linux:10 cpe:/o:redhat:enterprise_linux:10.2
References
Type Values Removed Values Added
CPEs cpe:/o:redhat:enterprise_linux:8 cpe:/o:redhat:enterprise_linux:8::baseos
References
Type Values Removed Values Added
First Time appeared Redhat hardened Images
Sudo Project
Sudo Project sudo
Vendors & Products Redhat hardened Images
Sudo Project
Sudo Project sudo
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
CPEs cpe:/o:redhat:enterprise_linux:7
cpe:/o:redhat:enterprise_linux:8
Type Values Removed Values Added
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.
Title Sudo: sudo: tz environment variable allows bypass of notbefore/notafter time-based authorization
First Time appeared Redhat
Redhat enterprise Linux
Redhat hummingbird
Weaknesses CWE-863
CPEs cpe:/a:redhat:hummingbird:1
cpe:/o:redhat:enterprise_linux:10
cpe:/o:redhat:enterprise_linux:9
Vendors & Products Redhat
Redhat enterprise Linux
Redhat hummingbird
References
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}