Spices like any food have a certain shelf life, and after this shelf life, they always go bad.
The length of the shelf life of the spices depends on how you store the spices. As you store your spices, you have to know that humidity, air, heat, and sunlight have a very negative impact on spices, and therefore, you ought to be very careful.