Cabinet is weighing up its options following a Supreme Court ruling that Corrections has wrongly calculated some inmates' release dates, the Prime Minister says.
The court ruled that the Department of Corrections had failed to accurately factor in remand time when calculating the sentence end date of a prisoner, Michael Marino.
The department said that, because of the ruling, about 500 of those currently in prison had release dates that would "likely" need to be changed.
Last Friday, 21 prisoners walked free, and more are expected to follow, in the wake of the ruling.
Corrections Minister Judith Collins said potentially thousands of prisoners could be affected, with errors dating back to 2002.
Prime Minister John Key today said Cabinet had received an update on the situation, but whether compensation would be considered for affected inmates was uncertain.
He said Crown Law had been asked to provide further advice.
Mr Key said Parliament could pass retrospective legislation to rule out paying compensation.