Legislation that would block compensation claims from prisoners who spent too long in jail is possible, Prime Minister John Key says.
"It's a possibility, but I wouldn't say necessarily a probability at this point," Key said this afternoon after Justice Minister Amy Adams earlier briefed Cabinet.
"We haven't received any advice, there are many possible ways this could go including potentially test cases or the like."
The Supreme Court last week ruled that Corrections had been misinterpreting the law around what counts as "time served" - meaning hundreds and possibly thousands of offenders have been jailed for too long.
The lawyer for one of the men who took the appeal will pursue compensation for wrongful imprisonment.
Because the issue dates back to 2002 if any compensation claim is successful the Government could face a bill in the millions of dollars.
Today, Key said it was "very uncertain" whether compensation should or could be paid.
Retrospective legislation that would remove any obligation to pay compensation was yet to be considered.
Corrections had not made an error, Key stressed, and had applied an interpretation of the law that had been confirmed by the Court of Appeal on numerous occasions.
"[Retrospective legislation] is a possibility, but I wouldn't say necessarily a probability at this point. We haven't received any advice, there are many possible ways this could go including potentially test cases or the like."
Any retrospective legislation would be highly controversial.
According to the Legislation Design and Advisory Committee, which advises departments, it can be appropriate if it validates matters that were generally understood and intended to be lawful, but were in fact unlawful because of a technical error.
"If we were to do that then, simply, Parliament would be saying, 'This was the understanding of what we passed back in 2002, and that was the way that the courts have considered it up until this point,'" Key said.
Today's Cabinet discussion was "broad", and included an estimate on how many people might be affected. Key declined to reveal that detail.
Offenders could get about $7500 for each month wrongly spent behind bars, based on a past case.
Corrections released 21 prisoners this week, and says about 500 current inmates could have their jail terms slashed. That number does not include former prisoners.
Corrections Minister Judith Collins on Friday said the chances of taxpayer money being paid out were "remote".
Time held in detention before a person is sentenced is treated by the law as time already served when release dates and parole are determined.
The Supreme Court has ruled that time in detention starts from the point of arrest - even if other charges are later laid.
Corrections has instead been working it out on a charge-by-charge basis.