Taxpayers may have to foot a huge compensation bill after the personal details of thousands of criminals were lost.