EPAS-00-006200 - The EDB Postgres Advanced Server must check the validity of all data inputs except those specifically identified by the organization.

Information

Invalid user input occurs when a user inserts data or characters into an application's data entry fields and the application is unprepared to process that data. This results in unanticipated application behavior, potentially leading to an application or information system compromise. Invalid user input is one of the primary methods employed when attempting to compromise an application.

With respect to database management systems, one class of threat is known as SQL Injection, or more generally, code injection. It takes advantage of the dynamic execution capabilities of various programming languages, including dialects of SQL. Potentially, the attacker can gain unauthorized access to data, including security settings, and severely corrupt or destroy the database.

Even when no such hijacking takes place, invalid input that gets recorded in the database, whether accidental or malicious, reduces the reliability and usability of the system. Available protections include data types, referential constraints, uniqueness constraints, range checking, and application-specific logic. Application-specific logic can be implemented within the database in stored procedures and triggers, where appropriate.

Solution

Modify database code to properly validate data before it is put into the database or acted upon by the database.

Modify the database to contain column/field definitions for each column/field in the database.

Modify the database to contain constraints and validity checking on database columns and tables that require them for data integrity.

Use prepared statements for user supplied inputs.

Do not allow general users direct console access to the EDB Postgres Advanced Server database.

If EDB SQL/Protect is being used to monitor and protect the EDB Postgres Advanced Server database from possible SQL injection attacks, install and configure SQL/Protect as documented here: https://www.enterprisedb.com/docs/epas/latest/epas_security_guide/02_protecting_against_sql_injection_attacks/02_configuring_sql_protect/

Alternatively, implement, document, and maintain another method of checking for the validity of inputs.

See Also

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

Item Details

Category: SYSTEM AND INFORMATION INTEGRITY

References: 800-53|SI-10, CAT|II, CCI|CCI-001310, Rule-ID|SV-259263r961158_rule, STIG-ID|EPAS-00-006200, Vuln-ID|V-259263

Plugin: PostgreSQLDB

Control ID: 589cd8ce22208922b3f72d7461326b4d51d2bc4b8c658df22f99506bdffcc9cb