Описание
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.
Отчет
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.
Меры по смягчению последствий
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'.
Дополнительная информация
Статус:
EPSS
7.8 High
CVSS3
Связанные уязвимости
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.
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.
Sudo: sudo: tz environment variable allows bypass of notbefore/notafter time-based authorization
A flaw was found in sudo. When sudoers rules use NOTBEFORE or NOTAFTER ...
EPSS
7.8 High
CVSS3