On the plus side, loans and bonds are often secured by collateral. In the case of a company going bankrupt, debt investments are ‘senior’ to equity, meaning that debt holders will get paid first, so as a debt investor, you should be able to recoup some losses if things go badly.
However, like all investments, there are a number of risks. For debt, these include default risk, interest rate risk, credit ratings risk and reinvestment risk. In the case of interest rate risk, when market interest rates rise, bond prices fall, and an investor might be stuck with a bond of very little value on the secondary market if they want to sell it. This is not relevant if a bond is retained until maturity. In the case of credit ratings risk, if an issuer is downgraded, the market price of their bonds could fall. With reinvestment risk, if the bonds are paid off earlier, when interest rates go down, investors may be forced to reinvest elsewhere in a less favourable interest rate environment.