You asked Firefox to connect securely to goodsite.com. The server for that site sent you credentials for malicious.com. This should never happen.
According to Herdict, other people who visit this site get credentials for goodsite.com. That means someone may be tampering with your Internet connection.
Do not log into any site or buy anything online until the problem is solved.
Try to visit another secure website, such as https://www.mozilla.org/. This will help us determine whether the problem is with your Internet connection, or with the website.
Give different advice if we can tell from browser history whether the problem affects all sites.
This shows a nicely formatted view of the certificate, with suspicious bits highlighted.
Certificate exception dialog as usual.