  Flavored modular differential equations sometimes arise from null states or
their descendants in a chiral algebra with continuous flavor symmetry. In this
paper we focus on Kac-Moody algebras $\widehat{\mathfrak{g}}_k$ that contain a
level-four null state $|\mathcal{N}_T\rangle$ which implements the nilpotency
of the Sugawara stress tensor. We study the properties of the corresponding
flavored modular differential equations, and show that the equations exhibit
almost covariance under modular $S$-transformation, connecting null states and
their descendants at different levels. The modular property of the equations
fixes the structure of $\mathfrak{g}$ and the level $k$, as well as the
flavored characters of all the highest weight representations. Shift property
of the equations can generate non-vacuum characters starting from the vacuum
character.
