We show that finite-dimensional Lie algebras over a field of characteristic zero such that the second cohomology group in every finite-dimensional module vanishes, are, essentially, semisimple.