WASHINGTON — Two of the nation’s largest mortgage firms illegally foreclosed on the homes of “almost 50” active-duty military service members, according to a Thursday report by the Government Accountability Office.

The report does not identify the two mortgage companies. GAO investigators attributed the finding to federal bank regulators, who recently completed a three-month probe into allegations of improper foreclosures carried out by the nation’s 14 largest home loan servicers.