Canned cranberry sauce can go bad if it's been opened and left out of the refrigerator.
If you do open cranberry sauce and have some leftover cranberry sauce you should cover the can of cranberry sauce with some plastic wrap and use a rubber band to secure the plastic wrap.
Then store it in the refrigerator or put the cranberry sauce in a sealed container and refrigerate it.
When refrigerated the cranberry sauce should last for a week.
If the cranberry sauce is not opened up then the canned cranberry sauce can last for 5 years or more without going bad.
Canned foods that are in Tin cans that remain sealed have a very long shelf life even past the expiration date.