PostgreSQL before 9.5.x before 9.5.2 does not properly maintain row-security status in cached plans, which might allow attackers to bypass intended access restrictions by leveraging a session that performs queries as more than one role.
http://www.securitytracker.com/id/1035468
http://www.postgresql.org/docs/current/static/release-9-5-2.html