4.11 Remove current working directory from default /etc/environment PATH

Information

This change removes any '.' or '::' entries from /etc/environment. If a '.' or '::' is present the current working directory is included in the default search path.

Rationale:

Any '.' and '::' will be removed from /etc/environment. This means that any harmful programs placed in common PATH locations, would never be automatically executed. All directories must be explicitly defined within the PATH variable.

Solution

Examine PATH in /etc/environment to see if it contains any '.' or '::' entries:

grep '^PATH=' /etc/environment |awk '/((:[ t]*:)|(:[ t]*$)|(^[t]*:)|(^.:)|(:.$)|(:.:))/'

If the command above yields output, remove the '.' and '::' entries from:

vi /etc/environment

Default Value:

Dot present

See Also

https://workbench.cisecurity.org/benchmarks/13069

Item Details

Category: CONFIGURATION MANAGEMENT, SYSTEM AND SERVICES ACQUISITION

References: 800-53|CM-2, 800-53|CM-6, 800-53|CM-7, 800-53|CM-7(1), 800-53|CM-9, 800-53|SA-3, 800-53|SA-8, 800-53|SA-10, CSCv7|5.1

Plugin: Unix

Control ID: 0e7f475949b6722964d016cafdfee8485e7b6fe1b77cae7825af801763fd86e4