Stiefel-Whitney classes of a real vector bundle $(E, \pi, M)$ are defined axiomatically in singular cohomology $H^*(M, \mathbb{Z}/2\mathbb{Z})$ (compare wiki).
Now various books state, that Stiefel-Whitney classes are not represented in de Rham cohomology (e.g. "The Stiefel Whitney classes are not de Rham cohomology classes" compare click).
Why is this the case? Naivly I would think, that the composition of the coefficient homomorphism with the de Rham iso $H^*(M, \mathbb{Z}/2\mathbb{Z}) \rightarrow H^*(M, \mathbb{R}) \rightarrow H_{dR}(M)$ should map Stiefel-Whitney classes on classes of de Rham cohomology satisfying the axioms of Stiefel-Whitney classes. Why does this fail? Can you give a reference?
There is no (nonzero) map $f : H^*(M; \mathbb{Z}/2\mathbb{Z}) \to H^*(M; \mathbb{R})$ as you claimed. The field $\mathbb{Z}/2\mathbb{Z}$ has characteristic $2$, but the field $\mathbb{R}$ has characteristic $0$. In $H^*(M; \mathbb{Z}/2\mathbb{Z})$, all the elements $\alpha$ satisfy $2 \alpha = 0$. So under your map $f$ you get $2 f(\alpha) = 0$, but over $\mathbb{R}$ you can divide by $2$ and you get $f(\alpha) = 0$...
More abstractly, the universal Stiefel-Whitney class $w_n$ lives in $H^n(\operatorname{Gr}_n(\mathbb{R}^\infty); \mathbb{Z}/2\mathbb{Z})$, the $n$th cohomology group of the Grassmanian of $n$-subspaces in $\mathbb{R}^\infty$. All the other Stiefel-Whitney classes $w_n(\xi)$ are pullbacks of this one. So if you wanted "de Rham" Stiefel-Whitney classes, you'd be looking at $H^n(\operatorname{Gr}_n(\mathbb{R}^\infty); \mathbb{R})$. But for example $\operatorname{Gr}_1(\mathbb{R}^\infty)$ is the infinite-dimensional real projective space $\mathbb{RP}^\infty$, and $H^1(\mathbb{RP}^\infty; \mathbb{R}) = 0$.