Unlike their American counterparts, Soviet cosmonauts went into space armed. Specifically, they carried the TP-82, pictured above. It had three barrels, the top two which fired approximately 40 gauge shotgun rounds. The lower barrel was chambered for the 5.45x39mm rifle round. If that didn't do the job, there was a machete built into the stock -- just in case....
Why did the cosmonauts carry this gun? It wasn't to fight off aliens, but protect themselves from human threats if they landed in unfriendly territory at the end of their missions.
This gun was used until 2006, when it was replaced with a standard semi-automatic handgun.
Link | Image: mpopeneker