5. $\left[\frac{4}{3}, 2\right]$.

Taking $D$ as the origin, the rays $D B, D C$ as the positive directions of the $x, y$ axes respectively to establish a Cartesian coordinate system, then $A(-1,0)$, $B(1,0), C(0,2)$. Let point $E\left(x_{1}, y_{1}\right), F\left(x_{2}, y_{2}\right)$, where, $y_{1}=-2 x_{1}+2, y_{2}=2 x_{2}+2$. Let the midpoint of line segment $E F$ be $M\left(x_{0}, y_{0}\right)$, then
$$
\left\{\begin{array}{l}
y_{1}-y_{2}=-2\left(x_{1}+x_{2}\right)=-4 x_{0} \\
x_{1}-x_{2}=2-\frac{y_{1}+y_{2}}{2}=2-y_{0} .
\end{array}\right.
$$

By $E F=1$, we get
$$
\left(4 x_{0}\right)^{2}+\left(2-y_{0}\right)^{2}=1
$$

Thus, $\left(4 x_{0}\right)^{2}=1-\left(2-y_{0}\right)^{2} \geqslant 0$, solving gives
$$
1 \leqslant y_{0} \leqslant 3
$$

Also,
$$
\overrightarrow{D E} \cdot \overrightarrow{D F}=\frac{1}{4}\left((\overrightarrow{D E}+\overrightarrow{D F})^{2}-(\overrightarrow{D E}-\overrightarrow{D F})^{2}\right)=\overrightarrow{D M}^{2}-\frac{1}{4} \overrightarrow{E F}^{2}=\overrightarrow{D M}^{2}-\frac{1}{4} \leqslant \frac{25}{16},
$$

which means $\overrightarrow{D M}^{2} \leqslant \frac{29}{16}$, or
$$
x_{0}^{2}+y_{0}^{2} \leqslant \frac{29}{16} .
$$

Substituting equation (1) into equation (3), eliminating $x_{0}$, and rearranging gives $15 y_{0}^{2}-4 y_{0}-32 \leqslant 0$, solving gives
$$
-\frac{8}{5} \leqslant y_{0} \leqslant \frac{4}{3}
$$

Combining equations (2) and (4), we get $1 \leqslant y_{0} \leqslant \frac{4}{3}$, then $\frac{2}{3} \leqslant x_{1}-x_{2} \leqslant 1$, therefore
$$
\overrightarrow{E F} \cdot \overrightarrow{B A}=\left(x_{2}-x_{1}, y_{2}-y_{1}\right) \cdot(-2,0)=2\left(x_{1}-x_{2}\right) \in\left[\frac{4}{3}, 2\right]
$$
5. Given in isosceles $\triangle A B C$, $A C=B C=\sqrt{5}$, points $D, E, F$ are on sides $A B, B C, C A$ respectively, and $A D=D B=E F=1$. If $\overrightarrow{D E} \cdot \overrightarrow{D F} \leqslant \frac{25}{16}$, then the range of $\overrightarrow{E F} \cdot \overrightarrow{B A}$ is $\qquad$ .