We extend the cohomological treatment of cleft extensions over cocommutative Hopf algebras by giving an interpretation of degree three Sweedler cohomology classes as obstructions to extensions. We show that every twisted action of a cocommutative Hopf algebra on an algebra R gives rise to an obstruction, a degree three Sweedler cohomology class of H with values in the center of R. The obstruction vanishes if and only if the twisted action belongs to a crossed product extension. We also show that every Sweedler three-cocycle can be realized as an obstruction.