MCU: Strong interference/ripple when touching a wire connected to a GPIO
If the input is unstable, then the internal pullup is either not enabled or too weak. You could measure the current flowing from this pin to ground to check that the pullup is actually enabled.

I would stabilize this pin with a stronger external pullup (eg. 4k7).