Patients undergoing cancer treatment, particularly those receiving chemotherapy or targeted therapies, can experience paronychia as a side effect. These treatments can weaken the immune system, making patients more susceptible to infections, including those around the nails. Additionally, drugs like EGFR inhibitors, used in treating various cancers, have been associated with skin and nail side effects, including paronychia.