If it's a HOEPA loan you can not contract for such a provision.
(d) Limitations. A mortgage transaction subject to this section shall not include the following terms:
(4) Increased interest rate. An increase in the interest rate after default.
The opinions expressed are mine and they are not to be taken as legal advice.