A basic question in submanifold theory is whether a given isometric immersion f : M n → R n+p of a Riemannian manifold of dimension n ≥ 3 into Euclidean space with low codimension p admits, locally or globally, a genuine infinitesimal bending. That is, if there exists a genuine smooth variation of f by immersions that are isometric up to the first order. Until now only the hypersurface case p = 1 was well understood. We show that a strong necessary local condition to admit such a bending is the submanifold to be ruled and give a lower bound for the dimension of the rulings. In the global case, we describe the situation of compact submanifolds of dimension n ≥ 5 in codimension p = 2.