Rancid cashews have a distinct flavor that can be described as something like a cross between sour and bitter. The taste is usually more intense than fresh cashews, and many people note an acrid scent when opening the package.
Rancidity occurs when fat oxidation reactions break down the fats in the nuts, breaking them down into various molecules like fatty acids and aldehydes (organic compounds composed of carbon, hydrogen and oxygen atoms). Aldehydes are responsible for giving rancid foods their unpleasant flavor. Various levels of rancidity may occur within certain food items such as nuts, resulting in flavors ranging from slightly unpleasant to vile or acrid.
The best way to avoid eating rancid cashew nuts is to check expiration dates before purchase, use good storage techniques (keep away from heat or light sources), eat nut products within six months of purchasing, or prepare your own roasted/salted product before it has time to spoil (roasting causes some of the volatile compounds that contribute to spoilage rates). For long-term storage, you should store them in airtight containers either in freezer bags or sealed containers with no air exposure at all. If you do happen to consume any stale cashews you may experience digestive issues including nausea and vomiting so be sure not to take too many!