There are a few exceptions to this rule. For example, in some states, cosigners may be released from their obligations if the primary borrower files for bankruptcy. However, these exceptions are rare. In general, cosigners should be aware that they are taking on a significant financial risk when they cosign a loan.
So before you cosign a loan, make sure you understand the risks involved. Talk to the lender about the terms of the loan, and make sure you are comfortable with your obligations. You should also get a copy of the loan agreement in writing and review it carefully before you sign it.