They were stored in a parts draw cabinet. Admittedly, in a room exposed more to the outside air, so with higher humidity.
Ah ha. I think that's the culprit. The foam itself degrades and produces some potentially corrosive substances but it seems they are not very mobile. Moisture multiplies the effect greatly by acting as a solvent and transporter.
Thin gold plating is porous. The underlying metal of the pins is an iron alloy. Without moisture the corrosive substances don't transport into the pores and reach the iron. Moisture alone will make gold plated surfaces on old chips corrode - but it's simple rust that starts in the pores and bubbles off the gold plating.
Add water transporting corrosives into the pores, and the mess in your photos is the result. Very sad.
I'm currently sorting out a quite vast quantity of moderately mixed ICs. It's an old collection, had been in plastic parts drawers in a dry location. Most of the ICs are loose, some in black foam, some al-foil wrapped. They are old enough that some of the loose ones have a dark silver-tarnish appearance to the pins. That's OK, not corrosion. Most are still shiny. Of the ones in black foam _most_ are still fine, but now and then I come across one or two that are a little corroded where in contact with the foam. Some of the foam is very decayed and falls apart into dust.
But so far nothing like your pics. I suspect the differentiating factor was the low humidity storage conditions of this collection.
As I sort them, ALL are ending up in stacks of 20 or less wrapped in alfoil, placed in small yellow paper envelopes in rows in boxes. It's an extremely dense and versatile storage system, easy to keep in good sorted order. The boxes have lids, so it's pest and dust proof.
check old instruments with cards for this foam shit, they like using it to stabilize the cards from the top to save money on braces
That's urethane foam rubber, the bane of restorers of old equipment. It decays to a sticky gunk, falling apart into small pieces that get all through the equipment, and is extremely corrosive to many metals. It's a 'remove on sight' menace.
The black antistatic foam otoh, seems to be something else. Not sure of its composition, other than probably containing a lot of carbon powder additive to make it conductive.