This is some type of Sumac in the genus Rhus. Probably either _Rhus glabra_ (Smooth Sumac) or _Rhus typhina_ (Staghorn Sumac). The berries of those two species are supposedly not poisonous. But they are closely related to other poisonous plants such as poison ivy and poison sumac. Poison ivy and poison sumac are in the genus Toxicodendron, but used to be in the genus Rhus.
A photo of Smooth Sumac ![Rhus glabra](