What could be this hard. 5 CM sized bump under toe?

A cyst. It could be a cyst or a foreign body reaction. Have it evaluated if it is causing pain. Otherwise observe for any changes in size, color and shape. If it changes and is not painful, have it evaluated anyway.