In order to describe the sensitivity of a cellular automaton (CA) to a small change in its initial configuration, one can attempt to extend the notion of Lyapunov exponents as defined for continuous dynamical systems to a CA. So far, such attempts have been limited to a CA with two states. This poses a significant limitation on their applicability, as many CA-based models rely on three or more states. In this paper, we generalize the existing approach to an arbitrary N-dimensional k-state CA with either a deterministic or probabilistic update rule. Our proposed extension establishes a distinction between different kinds of defects that can propagate, as well as the direction in which they propagate. Furthermore, in order to arrive at a comprehensive insight into CA's stability, we introduce additional concepts, such as the average Lyapunov exponent and the correlation coefficient of the difference pattern growth. We illustrate our approach for some interesting three-state and four-state rules, as well as a CA-based forest-fire model. In addition to making the existing methods generally applicable, our extension makes it possible to identify some behavioral features that allow us to distinguish a Class IV CA from a Class III CA (according to Wolfram's classification), which has been proven to be difficult.