WASHINGTON — Congress has until mid-October to raise the statutory borrowing limit or the United States will risk defaulting on its debt obligations, the Congressional Budget Office said in a report on Thursday.

The hard deadline comes as lawmakers have been under pressure from Steven Mnuchin, the Treasury secretary, to lift the debt ceiling before leaving Washington for the August recess. Republicans have been wrestling among themselves over whether to have a “clean” increase or to attach other policy priorities or spending cuts to legislation that lifts the limit.

The Treasury has been using “extraordinary measures” since this spring to avoid breaching the debt ceiling, and Mr. Mnuchin has said that his ability to do so was expiring sooner than anticipated because tax revenues have been trickling in slowly.

Weaker than expected tax collection — which could be related to expectations by taxpayers of tax cuts later this year — have also resulted in a larger than expected budget deficit this year and a bigger shortfall compared with 2016.