PGS9-00-000600 - PostgreSQL must provide non-privileged users with error messages that provide information necessary for corrective actions without revealing information that could be exploited by adversaries.

Warning! Audit Deprecated

This audit has been deprecated and will be removed in a future update.

View Next Audit Version

Information

Any PostgreSQL or associated application providing too much information in error messages on the screen or printout risks compromising the data and security of the system. The structure and content of error messages need to be carefully considered by the organization and development team.

Databases can inadvertently provide a wealth of information to an attacker through improperly handled error messages. In addition to sensitive business or personal information, database errors can provide host names, IP addresses, user names, and other system information not required for troubleshooting but very useful to someone targeting the system.

Carefully consider the structure/content of error messages. The extent to which information systems are able to identify and handle error conditions is guided by organizational policy and operational requirements. Information that could be exploited by adversaries includes, for example, logon attempts with passwords entered by mistake as the username, mission/business information that can be derived from (if not stated explicitly by) information recorded, and personal information, such as account numbers, social security numbers, and credit card numbers.

Solution

Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.

As the database administrator, edit 'postgresql.conf':

$ sudo su - postgres
$ vi $PGDATA/postgresql.conf

Change the client_min_messages parameter to be 'error':

client_min_messages = error

Reload the server with the new configuration (this just reloads settings currently in memory; it will not cause an interruption):

# SYSTEMD SERVER ONLY
$ sudo systemctl reload postgresql-${PGVER?}

# INITD SERVER ONLY
$ sudo service postgresql-${PGVER?} reload

See Also

https://dl.dod.cyber.mil/wp-content/uploads/stigs/zip/U_PGS_SQL_9-x_V2R3_STIG.zip

Item Details

References: CAT|II, CCI|CCI-001312, Rule-ID|SV-214053r508027_rule, STIG-ID|PGS9-00-000600, STIG-Legacy|SV-87503, STIG-Legacy|V-72851, Vuln-ID|V-214053

Plugin: PostgreSQLDB

Control ID: 09886bafdf70a1c15e3267ec64d28dd96a2975f8d61edc9ddf3020f71cb8c588