Let 2≤n≤9. Suppose that f:R→R is locally Lipschitz function satisfying f(t)≥Amin{0,t}−K for all t∈R with some constant A≥0 and K≥0. We establish an a priori interior Hölder regularity of C2-stable solution to the semilinear elliptic equation −Δu=f(u). If, in addition, f is nondecreasing and convex, we obtain the interior Hölder regularity of W1,2-stable solutions. Note that the dimension n≤9 is optimal.