This is a form of the carry trade.
You're borrowing at a lower yield to lend at the higher yield, and the risk is that you have to liquidate before the long one is mature.
Traders do this all the time, because every day you carry this position you're making the difference in yields.
The risk is always the same: the value of the things that give you the yield may change by enough to wipe out the interest difference.