I found this in my car, under passenger seat. Car is 2015 Subaru Legacy. Man at dealership said it wasn't a part of the car, but I'm still wondering. It appears pneumatic. The part that sticks out resists being pulled out more than it resists being pushed in. Maybe some kind of dampener? Has number "5124" stamped on it and some logo like "Piol/\x".
It's a damper, probably from a glove box door. Does your glove box open and close smoothly with a little resistance? Or does it just plop open when you pull the handle? If it plops open, that part is missing!
The logo on your part is from Piolax, who are a common OEM supplier for these dampers. The part is probably on the right hand side of your glove box door, just outside of the hinge. You may be able to see or feel it without removing the door.