Draft laws will be brought to federal parliament to head off a hit to the budget of up to $8 billion.

The laws relate to a successful Federal Court case brought by foreign affairs official Brendan Peace and other parties, who argued the Commonwealth should have paid him superannuation for a rent-free accommodation allowance received on overseas postings.

It was argued the Commonwealth was in breach of enterprise agreements and federal workplace laws, reducing the value of Mr Peace’s superannuation entitlement.

The laws would be retrospective, meaning around 10,000 public servants employed since 1986 would not be able to access lump sums, which could be worth up to $11 million each.

The Labor caucus was told at a meeting the government would bring laws to parliament the following day to knock out what was described as a “windfall gain” costing between $3 billion and $8 billion.

The court case could also expose some Commonwealth officials to large, unexpected debts for unpaid member contributions in return for little or no increase in their superannuation benefits, Finance Minister Katy Gallagher said.

“The bill is the most effective way of protecting against the unintended, and inequitable consequential impacts of a potential judgment that reverses long-standing practice,” she said in a statement.

Support is being sought from the Liberal-National coalition for the bill, which the government hopes will pass by the end of the week.