The gun was fired Sunday morning as the flight attendant, a woman who works for Republic Airlines, which operates US Airways Express flights out of Philadelphia, passed through a security check point, The Philadelphia Inquirer reported.
A Transportation Security Administration officer noticed the loaded gun and asked a police officer to handle it, TSA spokesman Jim Fotenos said.
While trying to unload the gun, the police officer accidentally fired it, said Police Lt. Ray Evers.
The flight attendant, whose name was not released, was given a citation for disorderly conduct, taken into custody and released, Evers said.
He said the woman had a legal permit to carry the gun.
The flight attendant told police she forgot the gun was in her bag.
The incident did not cause any flight delays, airport officials said.
Gal Gadot cast as Wonder Woman for 'Batman vs. Superman'
Couple mistakenly served bag of cash at McDonald's drive-thru