The NGINX service account must be configured to not have shell access.
Severity | Group ID | Group Title | Version | Rule ID | Date | STIG Version |
|---|---|---|---|---|---|---|
| medium | V-278382 | SRG-APP-000033 | NGNX-APP-000140 | SV-278382r1171898_rule | 2026-01-07 | 1 |
| Description |
|---|
| To mitigate the risk of unauthorized access to sensitive information by entities that have been issued certificates by DOD-approved PKIs, all DOD systems (e.g., networks, web servers, and web portals) must be properly configured to incorporate access control methods that do not rely solely on the possession of a certificate for access. Successful authentication must not automatically give an entity access to an asset or security boundary. Authorization procedures and controls must be implemented to ensure each authenticated entity also has a validated and current authorization. Authorization is the process of determining whether an entity, once authenticated, is permitted to access a specific asset. Information systems use access control policies and enforcement mechanisms to implement this requirement. Access control policies include identity-based policies, role-based policies, and attribute-based policies. Access enforcement mechanisms include access control lists, access control matrices, and cryptography. These policies and mechanisms must be employed by the application to control access between users (or processes acting on behalf of users) and objects (e.g., devices, files, records, processes, programs, and domains) in the information system. This requirement is applicable to access control enforcement applications (e.g., authentication servers) and other applications that perform information and system access control functions. |
| ℹ️ Check |
|---|
| Determine the path to NGINX config file(s): nginx -qT | grep "# configuration" # configuration file /etc/nginx/nginx.conf: Note: The default NGINX configuration is "/etc/nginx/nginx.conf", though various files may also be included. Identify the NGINX runtime user: grep -E '^\s*user\s+' /etc/nginx/nginx.conf Expected output (example): user nginx; Verify the user has no login shell: getent passwd nginx Expected output: nginx:x:998:998:Nginx user:/nonexistent:/sbin/nologin Ensure the shell is "/sbin/nologin", "/usr/sbin/nologin", or "/bin/false". If the NGINX runtime user has shell access, this is a finding. |
| ✔️ Fix |
|---|
| Set a nonlogin shell for the nginx user: sudo usermod -s /sbin/nologin nginx |