8. If for any $x \in(-\infty,-1)$, we have
$$
\left(m-m^{2}\right) 4^{x}+2^{x}+1>0 \text {, }
$$

then the range of real number $m$ is $\qquad$
8. $[-2,3]$.

Let $a=m-m^{2}, t=2^{x}$.
Then $a t^{2}+t+1>0$ holds when $t \in\left(0, \frac{1}{2}\right)$.
When $a \geqslant 0$, it obviously satisfies the condition;
When $a<0$, the parabola opens downwards and passes through the point $(0,1)$, so there must be a negative root, and it is only necessary that the value at $t=\frac{1}{2}$ is not less than 0.
$$
\begin{array}{c}
\text { Hence } \frac{1}{4} a+\frac{1}{2}+1 \geqslant 0 \Rightarrow a \geqslant-6 \\
\Rightarrow m-m^{2} \geqslant-6 \Rightarrow-2 \leqslant m \leqslant 3 .
\end{array}
$$