From the Super Mario Wiki
Ghost Piranhas are winged, cobalt blue Piranha Plants found in Yoshi's Island DS and as the name implies, they are ghosts. They move up and down or side to side. They also hang upside down and do not have a stem. If the player does not have enough time to react, they will eat Yoshi whole for about two seconds, leaving Yoshi's current baby floating around until Yoshi gets out to capture it. They can be defeated by throwing a Yoshi Egg at them or by having Baby DK do his dash attack on them.