Postgresql · Postgresql · CVE-2016-5423
**Name of the Vulnerable Software and Affected Versions**
PostgreSQL versions prior to 9.1.23
PostgreSQL versions 9.2.x prior to 9.2.18
PostgreSQL versions 9.3.x prior to 9.3.14
PostgreSQL versions 9.4.x prior to 9.4.9
PostgreSQL versions 9.5.x prior to 9.5.4
**Description**
The issue allows remote authenticated users to cause a denial of service, obtain sensitive memory information, or possibly execute arbitrary code. This can be achieved through a CASE expression within the test value subexpression of another CASE or inlining of an SQL function that implements the equality operator used for a CASE expression involving values of different types. Certain nested CASE/WHEN expressions can also crash the server.
**Recommendations**
For PostgreSQL versions prior to 9.1.23, update to version 9.1.23 or later.
For PostgreSQL versions 9.2.x prior to 9.2.18, update to version 9.2.18 or later.
For PostgreSQL versions 9.3.x prior to 9.3.14, update to version 9.3.14 or later.
For PostgreSQL versions 9.4.x prior to 9.4.9, update to version 9.4.9 or later.
For PostgreSQL versions 9.5.x prior to 9.5.4, update to version 9.5.4 or later.
As a temporary workaround, consider avoiding the use of nested CASE/WHEN expressions until a patch is applied.