Carved pumpkins, which can be worn, cannot be cursed. (Uncarved) Pumpkins, which cannot be worn, can be cursed with a curse book and an anvil.
Linked issues
Comments 2

⚠️ Don't try to change "Mojang Priority". It may only be changed by the developers. Consider this a warning.
Duplicate of MC-125810.