Cashews are a member of the same family as poison ivy, Anacardiaceae. Like poison ivy and many other members of the family, part of the cashew plant contains an oily chemical called urushiol, which is a strong irritant for most people and can even be fatal for some if ingested.
This is why they’re sold shelled, but why are they roasted? Roasting at high temperature destroys the shell oil, so commercially sold nuts will not trigger a reaction.
In cashews, the urushiol is found not only in the leaves, but also in a layer of oil between the shell and the cashew seed.
Needless to say, shelling cashews is something that needs to be done very carefully and not by consumers.
Despite the need for care in shelling cashews, it’s still often done by hand, much to the chagrin of the workers involved, particularly in poorer nations where safety equipment is often lacking.
Cashew nuts that are still in the shell or that are shelled and roasted at home at lower temperatures may be contaminated with the oil, so, shelling raw cashews is about as much fun as handling poison ivy.