That happened to me once; years ago.
I took a light gunship to a station to find out that "secret" on abandoned stations that Schine mentioned a while ago and found the spiders. I held my own with the basic laser pistol (forgot to bring something heavier from the armory) but decided I wasn't in the mood to get LV426ed so I ran back to my ship and took off.
As I pulled away from the station, I heard this "thump, thump thump!" noise. A spider had snuck into my air lock! It was trying to break into the main corridor to get me. So I opened the air lock manually, kicked the little bastard out then shot it to pieces with the ship's guns.
THIS is why I invented power armor.
No way! - Did you actually have a bug pull off the classic "Alien" choreography on you?
1) Survivor leaves a panicky situation in a hurry, aboard their ship, thinking they can finally kick off their shoes, and find some solace in the dim lights of the cockpit controls.
2) An uninvited extra passenger reveals itself.
3) After a small amount of bonus struggle, the invader gets blown out an airlock.
And that bug was familiar with this classic choreography... StarMade's AI isn't that dumb after all ;D