The federal government ran up a $25.77 billion budget deficit in November, bringing the amount of red ink in the first two months of the new fiscal year to a level 8 percent higher than last year, the Treasury Department reported yesterday.

The department said that the deficit for the current fiscal year, which began Oct. 1, totaled $56.51 billion, an increase of $4.13 billion over the same period in the 1987 fiscal year.

The Treasury Department report showed that revenue totaled $56.99 billion in November while spending totaled $82.76 billion. The $25.77 billion deficit was down from a $30.74 billion deficit in October.

The deficit for the entire 1987 fiscal year shrank to $148.01 billion from an all-time high of $221.1 billion in 1986.

The Congressional Budget Office has predicted that the deficit for 1988 will rise to about $150 billion. Many private forecasters are even more pessimistic, projecting a deficit of $175 billion.

The forecasts include the $30.2 billion in deficit reductions contained in this year's budget package.

Much of the pessimism comes because the 1987 budget figures were improved by a one-time infusion of revenue generated by the overhaul of the tax system. That revenue will not be available this year.

For November, the top spending categories, as usual, were defense, Social Security, other programs in the Department of Health and Human Services and interest on the national debt.

Defense spending totaled $20.66 billion last month. The administration estimates that defense spending for the entire fiscal year will be $289.3 billion.

Spending for Social Security, the country's largest domestic program, totaled $17.14 billion in November and is expected to total $215.3 billion for the fiscal year.

The rest of the Department of Health and Human Services spent $11.39 billion in November with spending for the year projected at $149 billion. Much of this money goes for two health care programs, Medicare and Medicaid.

Interest on the $2.4 trillion national debt totaled $16.62 billion in November with interest payments for the full fiscal year expected to hit $205 billion.