Hi, thanks for writing to HCM. No, this cannot be malignant or cancer!
well, If I were your treating Doctor for this case of painful lumps on foot, I would come up with three possibilities, these include: 
1.     an 
infected cyst like inclusion cyst, bursa, 
ganglion or gouty cyst or parasitic cyst
2.     The second possibility is of some inflamed tumor-like condition like benign and simple conditions like 
lipoma or 
neurofibroma or schwanomma; there is nothing to worry about these!     
3.     The last possibility is of 
dermatofibroma or low-grade chronic inflammatory pseudotumor ! Nothing to worry about these also!
I suggest you to go for a clinical assessment and an FNAC of the lump for confirmation and to relieve your concerns!
Hope this answers your question. If you have additional questions or follow up questions then please do not hesitate in writing to us. I will be happy to answer your questions. 
Wishing you good health.