4. Given the parabola $y=x^{2}+a x+b$ intersects the $x$-axis at two different points $A$ and $B$, and the distances from the origin to points $A$ and $B$ are both greater than 1 and less than 2, and the lengths of the two legs of a right triangle are $a$ and $b$. Then the range of the hypotenuse $c$ is ( ).
(A) $4<c<25$
(B) $2<c<5$
(C) $5<c<32$
(D) $\sqrt{5}<c<4 \sqrt{2}$
4.D.

Let the two roots of the equation $x^{2}+a x+b=0$ be $x_{1}$ and $x_{2}$, and $a>0, b>0$. Then
$$
\begin{array}{l}
10 .
\end{array}
$$

Thus, $x_{1}<0, x_{2}<0, -2<x_{1}<-1, -2<x_{2}<-1$.
And $a^{2}+b^{2}=\left(x_{1}+x_{2}\right)^{2}+\left(x_{1} x_{2}\right)^{2}$
$$
=\left(x_{1}^{2}+1\right)\left(x_{2}^{2}+1\right)+2 x_{1} x_{2}-1 \text {, }
$$

Therefore, $5<a^{2}+b^{2}<32 \Rightarrow \sqrt{5}<c<4 \sqrt{2}$.