The most obvious weakness of the Vernam function is that it requires the key to be as long as the message.
This weakness rendered Vernam's cipher totally impractical when it was invented (1917) but is much less so today. Many cryptographers overlook this change.
The more subtle weakness is the fact that fitting back a fake plaintext to a given ciphertext will likely yield a random looking key, so that if the encrypted plaintext is encrypted with a less random key, this fact will implicate it.
So it is incumbent on the user to apply a totally random key to insure the full equivocation offered by Vernam