Pistachio Worms: Risks, Safety, and How to Spot Them

The worms you find inside pistachios are almost always larvae of the navel orangeworm, a moth species called Amyelois transitella that infests tree nuts and fruit crops across California’s Central Valley. These small caterpillars range from cream to reddish-orange, grow up to three-quarters of an inch long, and have a distinctive black crescent marking near the head on both sides. Finding one is unpleasant but not uncommon, and understanding how they get there can help you decide what to do with the rest of your bag.

How Larvae Get Inside Pistachios

Pistachio shells naturally split open while still on the tree, a stage growers call “hull split.” This is the moment of vulnerability. Female navel orangeworm moths lay their eggs directly on nuts with split or ruptured hulls, and the freshly hatched larvae bore into the shell to feed on the kernel inside. The larvae consume the nut meat as they grow through several molts before reaching full size.

The moth’s lifecycle revolves around nut crops. Larvae overwinter inside leftover nuts (called “mummy nuts”) that remain on the ground or on trees after harvest. They pupate in March through early May, and adult moths emerge from late April to mid-May. From there, successive generations target the current season’s crop. Late-harvested pistachios, nuts with bird damage, or those with early hull cracks are especially prone to infestation because the exposed tissue gives larvae easy entry.

The Real Health Concern: Aflatoxin

The larvae themselves are not toxic. Accidentally eating one, while gross, won’t make you sick on its own. The bigger concern is what follows the larvae in. When navel orangeworm larvae bore into a pistachio, they damage tissue and create openings that allow fungal spores to colonize the nut. The fungi that move in, particularly species of Aspergillus, can produce aflatoxins, which are potent carcinogens regulated in food worldwide.

According to the Food and Agriculture Organization, navel orangeworm infestation has been associated with very high levels of aflatoxin in pistachios. The connection is direct: insect damage exposes the nut’s interior to fungal colonization, and the warm, moist conditions inside a damaged shell are ideal for toxin production. This is why a wormy pistachio often also tastes bitter or looks discolored. If you crack open a pistachio and see webbing, frass (tiny dark droppings), or a larva, the nut may also carry mold you can’t see. Spit it out and discard it.

How Many Infested Nuts Are Allowed

The FDA sets what it calls “defect action levels” for unavoidable natural contaminants in food, and pistachios have a specific threshold. For unshelled pistachios, the reject level is 10% of nuts showing defects including insect infestation, mold, rancidity, or shriveling. For shelled pistachios, that threshold drops to 5%. Below those levels, a batch is considered commercially acceptable.

This means finding one or two wormy pistachios in a large bag doesn’t indicate a food safety failure. It reflects the reality of growing tree nuts outdoors, where some level of insect contact is unavoidable despite pest management. That said, if you’re consistently finding damaged nuts, webbing, or larvae in a particular brand or bag, the product quality is poor and worth avoiding.

Spotting and Avoiding Infested Nuts

You can catch most wormy pistachios before eating them by paying attention to a few signs. Infested nuts often have visible webbing inside the shell, small dark specks of frass, or discoloration on the kernel. The nut meat may look shrunken, darkened, or have an off smell. A bitter or “off” taste when you bite into a pistachio is another reliable signal to spit it out immediately.

When buying pistachios, choose reputable brands that sort and screen their product. Commercial processing includes electronic sorting that detects discolored or damaged nuts, but no system catches every one. Roasted and salted pistachios are less likely to harbor live larvae than raw ones, though the processing doesn’t eliminate aflatoxin if it’s already present.

Storing Pistachios to Prevent Pantry Moths

Once pistachios are in your home, the navel orangeworm isn’t typically laying new eggs in your pantry. The more common household problem is the Indian meal moth, a related pantry pest that can infest stored nuts, grains, and dried fruit. If you’ve had pantry moth issues or want to be cautious, placing pistachios in the freezer for one week kills any eggs or larvae that may be present.

For longer storage, keep pistachios in airtight containers in the refrigerator or freezer. This slows rancidity, prevents moisture buildup that encourages mold, and stops any pantry pests from reaching the nuts. At room temperature in an open bag, pistachios are vulnerable to both quality loss and insect activity, especially in warmer months. Sealed glass or heavy plastic containers work well for pantry storage if you plan to eat them within a few weeks.