Section 142(2) in Bharatiya Nagarik Suraksha Sanhita, 2023
(2)Whenever any person has been imprisoned for failing to give security under this Chapter, the High Court or Court of Session, or, where the order was made by any other Court, District Magistrate, in the case of an order passed by an Executive Magistrate under section 136, or the Chief Judicial Magistrate in any other case, may make an order reducing the amount of the security or the number of sureties or the time for which security has been required.