STIGUI
V-268155CAT II — Medium severitySV-268155r1131113_rule

NixOS must require users to reauthenticate for privilege escalation.

Rule version ANIX-00-001500 · STIG v1 · 2025-08-19

Discussion

Without reauthentication, users may access resources or perform tasks for which they do not have authorization.

When operating systems provide the capability to escalate a functional capability, it is critical the user reauthenticate.

Check

Verify NixOS enforces reauthentication with sudo with the following command:

$ sudo grep timestamp_timeout /etc/sudoers

Defaults timestamp_timeout=0

If "timestamp_timeout" is greater than 0, is commented out, or is missing, this is a finding.

Fix

Configure NixOS to enforce reauthentication with sudo.

Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix:

security.sudo.extraConfig = '' Defaults timestamp_timeout=0 '';

Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch

Identifiers

Group ID
V-268155
Group title
SRG-OS-000480-GPOS-00227
Rule ID
SV-268155r1131113_rule
Check ID
C-72079r1039351_chk
Fix ID
F-71982r1131112_fix