I had exactly this occurrence with a JBL K140 speaker. A friend of mine was moving and asked to leave some of his music gear at my shop. One item was a K140 in an old Peavey 115 cabinet. After the gear had been at my place for over a year, he gave it to me.
I put the K140 in an EV TL606 type cabinet. When I originally tried the speaker in the cabinet I noticed a slight rattle I thought was the cabinet.
I began trying to determine the res freq of the cab. I laid the cabinet on its back, supported between to chairs, to sprinkle some rice on the cone and used a tone oscillator to find the cab tuning. I noticed the rattle was gone when the cab was on its back.
After I got the cab res. freq. figured out, I stood the cabinet back up and the rattle returned. The rattle sounded like it was directly behind the aluminum dust cover. I laid the cab on its back again and the rattle was gone again. I pulled the back off the cab and looked in the vent hole in the magnet. It appeared I was seeing the back side of the dust cover. With the back off the cab, I laid it on its back again with the cab between a couple chairs. I used the tone generator to pass some low end through the speaker; no rattle. With the cab still on its back supported by two chairs, I looked in the vent again and could see “something”. I pulled the screen out of the vent hole and a semi-round chunk of foam rubber the dia. of the vent hole fell out. It was hard as rock, harder than a chunk of Scotchbright pad, not compressible by fingers. I stood the cabinet back up, and the rattle was gone & stayed gone. I put the screen back in the vent hole and the back on the cabinet. It’s one of my speakers for my shop stereo and has been about 10 years.