On attempt to change my cPanel password I was warned that:

Your password could not be changed because the new password failed with the following reason : (is too similar to the old one), please try again! 

Which is correct, my old and new passwords does differ by a single character. However that rises the question how exactly the cPanel code does know my old plain text password. Should not it be hashed?


I just logged into cPanel and when I click to change my password it asks me for three things:

  1. My old password
  2. A new password
  3. Confirmation of the new password

Screen Shot: enter image description here

It also says that the old password cannot be empty.

This may not be exactly how cPanel does it but, it is a possibility:

  1. Since you have sent it your old password to cPanel it can hash it and see if it is equal to your password while still storing a copy of your unhashed password (in memory not on disk)
  2. Now since it has confirmed your old password hashes to the correct value it can perform tests on the plain text version (that you just barely sent it) and give an error if one of the tests fails
  3. If the new password and confirmation match store the new password.

Answer as to why it knows your old password:

You just gave it to it so it knows your previous password and stores it in RAM (not on disk). This is assuming that you are referring to your last password (the one that you're currently changing) and not to one that you used in a prior iteration.

  • Does the plaintext password leave my browser or is it hashed client side and then sent. Jul 25 '14 at 14:55
  • @YordanPavlov It most likely sends it as plaintext. This is not a security issue as cPanel uses SSL (at least mine does). It also won't be stored on the server for more than an few seconds. Also as I understand it RAM is much harder to extract information from than something on the file system. Jul 27 '14 at 10:07
  • The reason I searched for this question is my domain host uses cPanel and they just asked for the last 4 characters of my password. I'm trying to figure out if they store that when I set it or if the password as plain text. "Sanjuna" of customer support won't give me an answer.
    – Gary
    Jul 2 '15 at 20:56

@Travis Pessetto most likely has the correct answer to your question.

I just wanted to point out that some places will do this without knowing your old plaintext password. This can be done by generating permutations of your new password and comparing each hash to your old password hash.

Old Hash (Plaintext Unknown):

New Password:

Check Permutations:

Match Found! New password is too similar to old password!

Note: sha256 is a fast hashing algorithm, I used it only for an easy example.


I just got an email from my hosting company. It was a link to the new cPanel access point for my sites, and the email included my cPanel username and password as plain text. This was disturbing to say the least. It lead me here where I do not see a verified answer but I am led to believe that yes it is stored as plain text somewhere unless my hosting company is storing it on their own somewhere.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.