Let $X$ be a variety and $H$ a Cartier divisor on $X$. We prove that if $H$ has Du Bois (or DB) singularities, then $X$ has Du Bois singularities near $H$. As a consequence, if $X \to S$ is a family over a smooth curve $S$ whose special fiber has Du Bois singularities, then the nearby fibers also have Du Bois singularities. We prove this by obtaining an injectivity theorem for certain maps of canonical modules. As a consequence, we also obtain a restriction theorem for certain non-lc ideals.