Many companies featured on Money advertise with us. Opinions are our own, but compensation and
in-depth research may determine where and how companies appear. Learn more about how we make money.

Roulette Wheel with ball on  0
Alexander Kozachok—Getty Images

IRA and 401(k) balances are holding steady near record levels. But certain risks have been creeping into the typical plan portfolio, which after a long bull market may be overexposed to stocks and otherwise burdened by a rising loan balance, new research shows.

The average balance in both IRA and 401(k) accounts dipped slightly in the second quarter, but continues to hover above $91,000 for the past year, according to new data from Fidelity Investments. Savers who have participated in a 401(k) for at least 10 years, and those who have both an IRA and a 401(k), now have balances that top $250,000.

Much of this growth owes to the stock market, which has more than doubled since the recession. But individual savers are stepping up as well. For the first time, the average 401(k) participant socked away more than $10,000 (including company match) in a 12-month period, Fidelity found. That occurred in the second quarter, when the total contribution rose to $10,180, up from $9,840 the previous quarter.

Yet bulging savings have tempted some workers to dig a little deeper into the 401(k) piggy bank. New plan loans and participants with a loan outstanding held constant in the second quarter, at 10.1% and 21.9% respectively. But the average outstanding plan loan balance climbed to $9,720, compared to $9,500 a year earlier. This leaves borrowers at greater risk of losing tax-advantaged savings and growth.

Plan loans are a primary source of retirement account leakage—money that “leaks” out of savings and never gets replaced. This may occur when a worker switches jobs and cannot repay the loan, which becomes an early distribution and may be subject to taxes and penalties.

Meanwhile, savers who are not invested in a target-date fund or managed account, and who have not rebalanced to maintain their target allocation, may find that the brisk rise in stock prices has left them with too much exposure to stocks. Baby boomers especially are at risk, Fidelity found. Pre-retirees should be lightening up on stocks, while adding bonds to reduce risk. But unless they regularly rebalance—and few people do—boomers have been riding the recent market gains, so they are holding an ever larger allocation in stocks than they originally intended.

That inertia could hurt boomers just as they move into retirement. During the last recession, 27% of those ages 56 to 65 had 90% or more of their 401(k) assets in stocks, which fell some 50% from the market peak in 2007. Those kinds of losses could wreck a retirement.

Could this scenario repeat? Very possibly. Nearly one in five of those ages 50-54 had a stock allocation at least 10 percentage points or higher than recommended, Fidelity found. For those ages 55-59, some 27% of savers exceed the recommended equity allocation. One in 10 in both age groups are 100% invested in stocks in their 401(k). It's possible that these investors are holding a significant stake in safe assets, such as bonds or cash, outside their plans, which would cushion their risk. But that often is not the case.

Whether you're approaching retirement, or you're just starting out, it's crucial to hold the right allocation in your 401(k) plan. Younger investors, who have decades of investing ahead, can ride out market downturn, so a 80% or higher allocation to stocks may be fine. But a 60-year-old would do better to keep only 50% invested equities, with the rest in a mix of bonds, real estate, cash and other alternatives. To get a suggested portfolio mix, try this asset allocation tool. And for tips on how to change your portfolio as you age, click here.

Read next: Americans Left $24 Billion in Retirement Money on the Table Last Year