Does bankruptcy affect second mortgages?

Yes. All of the above information regarding discharge and the lien status applies to both first and second mortgage accounts.