This is the dominant risk in government bonds and a large part of the risk in investment-grade credit. It is not a credit question. A Treasury will always pay you back; the risk is that you are stuck holding a below-market coupon while better bonds are issued around you.
It is also a risk for banks, which borrow short and lend long. A sharp rise in rates cuts the market value of a long bond portfolio even though the accounting may not show it until the bonds are sold.
Example: a bank holds $1bn of bonds with duration 6. Yields rise 200 basis points. The mark-to-market loss is roughly 6 x 2% = 12%, or $120,000,000, regardless of credit quality.
Related: duration, treasury-futures, reinvestment-risk, dv01