No, Heroku Postgres is not protected from MitM. The highest risk is pg:psql from the command line, as itโs pretty easy to get between your laptop and Heroku using Wi-Fi pineapple or similar tools. The transition between your Dynos and the database is much more complicated. This is possible because Heroku did not create a CA to sign its database certificates, so there is no root of trust to use when connecting.
I made a note that I actually performed such a MitM against Heroku Postgres here , please apply for support with Heroku, saying that you want to see how they create a CA and issue a trusted root that we can use to authenticate connections, if you are interested.
source share