Caged Ghost

Caged Ghosts are close relatives to Dangling Ghosts that grow from drainage grates in the floor. They are gelatinous ghosts commonly found in damp environments.

Super Mario World 2: Yoshi's Island / Yoshi's Island: Super Mario Advance 3
In Super Mario World 2: Yoshi's Island and its reissue, Caged Ghosts are found mainly in Naval Piranha's Castle and Ultimate Castle Challenge. There are two different kinds of Caged Ghosts: the ones that are squeezed into sewer tunnels, and the large round mounds. They completely block a Yoshi's path to the goal or other bonuses, and simply touching one causes the Yoshi to drop Baby Mario off his back. As their primary attack, Caged Ghosts spit an infinite number of green Shy-Guys or Woozy Guys at the Yoshi, and they can be used to attack the Caged Ghost. Doing so causes it to shrink/recede, until it is at its farthest point, when it produces no more enemies and the Yoshi is able to pass it. However, Caged Ghosts are invincible and slowly grow out again a while after being hit with an egg, regaining their ability to produce enemies.

Yoshi's New Island
Caged Ghosts return in Yoshi's New Island in the level King Clawdaddy's Sewer Castle, where they act and look just like in their original appearances.

Super Mario World 2: Yoshi's Island

 * Shogakukan guide: ドカンいっぱいに広がって、通路をふさいでしまう. タマゴを当てると、ちょっとひるむが、すぐに回復するので連続攻撃が決め手. (They spread out to fill up the passageway. If you hit them with an egg, they flinch a little, but they recover quickly, so a series of attacks is the key.)
 * Player's Guide: Lurking in sewers, this tough guy eats Shy-Guys, then spits them out for your egg-making pleasure.

Yoshi's Island: Super Mario Advance 3

 * Shogakukan guide: 土管いっぱいに広がって、通路をふさいでしまう. タマゴを連続でぶつけて後退させ、広い場所に出たらとびこえてしまおう. (They spread out to fill the earthen pipe and block the passage. Hit them with a series of eggs to make them retreat, then jump over them when a wide path opens up.)

Yoshi's New Island

 * Shogakukan guide: 通路をふさぎながら、ヘイホーを吐き出してくる. 倒せないが、タマゴを当てると縮んでいく. その場で大きくなるものと、横に伸びるものの2種類がいる. (It spits out Shy Guys while blocking the passage. They cannot be defeated, but if you hit them with an egg, they shrink. There are two types: one that grows on the spot and the other that grows horizontally.)