  In gravitational theories where a canonical scalar field $\phi$ with a
potential $V(\phi)$ is coupled to a Gauss-Bonnet (GB) term ${\cal G}$ with the
Lagrangian $f(\phi,{\cal G})$, we study the cosmological stability of tensor
and scalar perturbations in the presence of a perfect fluid. We show that, in
decelerating cosmological epochs with a positive tensor propagation speed
squared, the existence of nonlinear functions of ${\cal G}$ in $f$ always
induces Laplacian instability of a dynamical scalar perturbation associated
with the GB term. This is also the case for $f({\cal G})$ gravity, where the
presence of nonlinear GB functions $f({\cal G})$ is not allowed during the
radiation- and matter-dominated epochs. A linearly coupled GB term with $\phi$
of the form $\xi (\phi){\cal G}$ can be consistent with all the stability
conditions, provided that the scalar-GB coupling is subdominant to the
background cosmological dynamics.
