In Chapter 13 you have the right to cure defaults in a mortgage up to the foreclosure sale. On some states you may be able to use Chapter 13 to redeem if there is a redemption period after the sale, but most of the time prior to the sale is the last chance.
If you file before the sale and you qualify for an automatic stay then that will stop the sale. In some cases there may also be a codetor stay if the other signer does not file. You can then cure over a five year period out of your future earnings.
