Home Office and Ministry of Justice has lost almost 3,500 security passes for prisons and ID cards.