The government is weighing whether a recent court win for mortgage giants Fannie Mae and Freddie Mac should be appealed to the Supreme Court, Treasury Secretary Steven Mnuchin told CNBC on Tuesday.”We’re looking at it carefully and we’re considering what to do about it,” Mnuchin said of the decision last week from a federal appeals court, which overturned a prior ruling that had favored the government’s continuing collection of the two companies’ profits.The panel of federal judges in New Orleans ruled that the mortgage lenders can pursue claims that the Treasury’s profit-sweeping is illegal, multiple outlets reported. The judges also found that the structure of the Federal Housing Finance Agency, which regulates Fannie and Freddie, is unconstitutional, according to reports.”We’re going to consider appealing it to the Supreme Court,” added Mnuchin, who spoke to CNBC ahead of his testimony before the Senate Banking Committee about housing finance reform. Mnuchin was joined in that hearing by Housing and Urban Development Secretary Ben Carson and FHFA Director Mark Calabria.”There’s two parts of it. One is obviously the cash-flow sweep, and that’s what the Treasury is looking at,” Mnuchin said.The Treasury Department did not immediately respond to CNBC’s request for comment on Mnuchin’s remarks.In 2008, as the housing market collapsed, Fannie Mae and Freddie Mac were placed in a federal conservatorship and received billions of dollars in bailout funds. After eventually returning to profit-making status, the companies were forced to pay billions of dollars back to the Treasury.The New York Times reported in 2017 that the firms received more than $187 billion from U.S. taxpayers but that the companies have paid back nearly $271 billion to the government since then.Treasury’s new plan to return Fannie and Freddie to private control landed with a thud Friday. The plan outlined a litany of recommended steps to overhaul the companies but was criticized as vague or incomplete by investors and analysts.Preferred shares of the companies tumbled after that plan was unveiled.