It is generally not recommended to do so unless the spices are in a vacuum sealed container, because you run the risk of exposing the spices to humidity and moisture which can alter the flavor or even spoil the spices. If you need to store a large amount of spices, you can get away with storing them in the freezer. But you need to avoid taking them in and out of the freezer frequently, because the temperature fluctuation can create condensation and eventually mold. As mentioned earlier, the best way to store it is in an airtight glass jar in a cool, dark, and dry cabinet.