NGINX must protect audit information from unauthorized access.

Severity
Group ID
Group Title
Version
Rule ID
Date
STIG Version
mediumV-278388SRG-APP-000118NGNX-APP-000400SV-278388r1171916_rule2026-01-071
Description
If audit data were to become compromised, then competent forensic analysis and discovery of the true source of potentially malicious system activity is difficult if not impossible to achieve. In addition, access to audit records provides information an attacker could potentially use to their advantage. To ensure the veracity of audit data, the information system and/or the application must protect audit information from any and all unauthorized access. This includes read, write, and copy access. This requirement can be achieved through multiple methods, which will depend upon system architecture and design. Commonly employed methods for protecting audit information include least privilege permissions as well as restricting the location and number of log file repositories. Additionally, applications with user interfaces to audit records must not allow for the unfettered manipulation of or access to those records via the application. If the application provides access to the audit data, the application becomes accountable for ensuring audit information is protected from unauthorized access. Audit information includes all information (e.g., audit records, audit settings, and audit reports) needed to successfully audit information system activity. Satisfies: SRG-APP-000118, SRG-APP-000119, SRG-APP-000120, SRG-APP-000121, SRG-APP-000122, SRG-APP-000123, SRG-APP-000267
ℹ️ 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. Determine the location of the access and error logs: grep "_log" <path to config> Determine the permissions for the log files: ls -la <path to error.log> -rw-r--r-- 1 root root 0 May 23 15:04 /var/log/nginx/error.log ls -la <path to access.log> -rw-r--r-- 1 root root 0 May 23 15:04 /var/log/nginx/access.log If files have write permissions for anyone other than the owner, this is a finding.
✔️ Fix
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. Determine the location of the access and error logs: grep "_log" <path to config> Set appropriate permissions for the log files: chmod 644 <path to error.log> chmod 644 <path to access.log>