WASHINGTON (AP) — The Federal Emergency Management Agency wrongly released to a contractor the personal information of 2.3 million survivors of devastating 2017 hurricanes and wildfires, potentially exposing the victims to identity fraud and theft, a government watchdog reported Friday.

Homeland Security Department’s Office of Inspector General found the breach occurred when FEMA was working with a contractor that helps provide temporary housing to those affected by disasters. FEMA is one of Homeland Security’s many agencies; the sprawling 240,000-person department also includes immigration enforcement, and the U.S. Secret Service.

FEMA officials agreed that changes needed to be made, and said they were working to change how they deliver data to avoid giving too much information and it will be completed by 2020.

Some information, like names, last four digits of a Social Security number and how many people live in a household are required to confirm eligibility and locate housing for victims. But FEMA also provided the contractor with bank names, electronic funds transfer numbers and bank transit numbers that were not required by the contractor.

The 2.3 million people lived through Hurricanes Harvey, Irma, Maria and California wildfires.

The watchdog said that FEMA violated both federal privacy laws and also Homeland Security policy by giving the extra data to the contractor, whose name was redacted in the report made public Friday.

The contractor also knew that FEMA was providing too much personal data but didn’t inform the disaster relief agency.

The 2017 hurricane season was particularly brutal. Harvey slammed ashore in Texas on Aug. 25, 2017, as a powerful Category 4 storm. It killed 68 people and deluged much of the Houston metropolitan area — home to more than 6 million people — with 3 to 4 feet of water. Flooding damaged more than 300,000 structures and caused an estimated $125 billion in damage, according to a report from the National Hurricane Center . Irma struck Florida Sept. 10 and battered Georgia and North Carolina, killing 129 and devastating the Florida Keys. Maria made landfall Sept. 20, devastating Puerto Rico and plunging much of the island in darkness for months after, and left some 3,000 people dead.

Wildfires in California in 2017 burned some 1.2 million acres of land, destroyed more than 10,800 structures and killed at least 46, and insurance claims topped $3.3 billion.