PostgreSQL is vulnerable to man-in-the-middle attacks. This is because PostgreSQL client library (libpq) does not enforce the use of TLS/SSL for a connection to a PostgreSQL server when the PGREQUIRESSL environment variable was set. An attacker could use this flaw to strip the SSL/TLS protection from a connection between a client and a server.
www.debian.org/security/2017/dsa-3851
www.securityfocus.com/bid/98461
www.securitytracker.com/id/1038476
access.redhat.com/errata/RHSA-2017:1677
access.redhat.com/errata/RHSA-2017:1678
access.redhat.com/errata/RHSA-2017:1838
access.redhat.com/errata/RHSA-2017:2425
access.redhat.com/security/updates/classification/#moderate
bugzilla.redhat.com/show_bug.cgi?id=1452734
security.gentoo.org/glsa/201710-06
www.postgresql.org/about/news/1746/
www.postgresql.org/docs/current/static/release-9-5-5.html
www.postgresql.org/docs/current/static/release-9-5-6.html
www.postgresql.org/docs/current/static/release-9-5-7.html