It is permitted, provided they are not liable to be splashed in normal use
However IMO it is undesirable, because, as you say, the sink might overflow or there could be a leak. You could change them for waterproof sockets with sealing covers as are used in the garden, but good ones (MK or Crabtree brands) are quite expensive and the cheaper ones often do not seal when a plug is in the socket.
In my view it is preferable, with undercounter appliances, to have a switch above the worktop in the wall over the appliance, feeding a socket on the wall behind the appliance. It is true that if the fuse in the plug ever blows, you have to pull out the appliance to change it, but this is very rare these days, and the appliance will probably have to come out for repair if it does have such a fault.
this method is very neat and easy to understand, and it means you can change the appliance without having to cut off plugs or poke the flex through tiny gaps in cupboards.
Most electrical work in kitchens is notifiable.