The Space Shuttle and ISS (and Orion) had/have microgravity toilets. They have some active suction and spinning tines that push the material against the walls of the containment vessel. The ISS toilet has changeable waste containers that are dumped in the unmanned supply capsules.
The Space Shuttle's toilet was just cleaned during servicing after a mission. The Shuttle had a max flight duration of about two weeks so there wasn't a need to have changeable waste containers.
In the case a toilet catastrophically malfunctions in microgravity imagine a snow globe. Whatever way you want to filter out the "snow"...it's going to land on everything inside.
In the most literal sense shit is serious in space.