It is not permissible to transgress against public wealth by stealing, embezzling and so on. The one who does so is transgressing against the Muslims as a whole, not only against the state, and the one who takes any such thing does not own it, and he has to give it back to the bayt al-mal (state treasury). This is indicated in a report narrated by Ahmad (20098), Abu Dawood (3561), al-Tirmidhi (1266) and Ibn Majah (2400) from Samurah ibn Jundub (may Allah be pleased with him) who said that the Prophet (peace and blessings of Allah be upon him) said: “The hand that takes is responsible for what it has taken until it returns it.” al-Tirmidhi said: A saheeh hasan (authentic and sound) hadeeth (narration). Shu’ayb al-Arnaout said in Tahqeeq al-Musnad: it is hasan (sound) li ghayrihi (hasan because of corroborating evidence).
Ibn Qudamah (may Allah have mercy on him) said: Once this is established, the one who embezzled something must return it if it still exists, and there is no difference of scholarly opinion as far as we know. Al-Mughni (5/38).
Returning it is part of repenting properly. In order for repentance to be accepted, it is essential that property and rights be restored to their owners, along with regret, asking for forgiveness and resolving not to do it again.
But if it cannot be returned to the bayt al-mal, then what is left of the money should be given in charity to the poor and needy, but if he is poor it is permissible for him to take from it as much as he needs. As for that which has already been consumed, spent and disposed of, we hope that Allah will forgive him for that.
And Allah knows best.