Yes, Xanax is used to treat panic attacks along with social anxiety disorder (SAD). Xanax was first approved in the US in 1981 and has been a commonly prescribed medicine until now.