The possibility of withdrawal depends on the terms of the treaty and its travaux preparatoire. It has, for example, been held that it is not possible to withdraw from the International Covenant on Civil and Political Rights. When North Korea declared its intention to do this the Secretary-General of the United Nations, acting as registrar, said that original signatories of the ICCPR had not overlooked the possibility of explicitly providing for withdrawal, but rather had deliberately intended not to provide for it. Consequently, withdrawal was not possible.
What state declared its intention to withdraw from the International Covenant on Civil and Political Rights?
North Korea