If someone is seriously disabled and will likely be unable to work enough again to repay their student loans, a bankruptcy court judge can set aside the legal obligation and include the loans in their case discharge. However, keep in mind that short of paralysis or a serious, incurable condition such as terminal cancer, it is unlikely that you will be considered disabled enough to not pay your student loans. Being on Social Security disability is not enough to be approved for elimination of your student loan obligations.
An additional exception that could apply to more people is if the school has closed down. The bankruptcy judge will then likely forgive the student loans in your petition.