I updated a 1.4.0 box to 1.4.1
Before I started, I ran ‘save’ just to be sure my active configuration was saved.
Then I began the upgrade using the ‘add system image’ to add the new ISO. I accepted the default name and answered yes to all questions, including the configuration copy.
I rebooted and 1.4.1 was now live! My configuration seemed to be working and traffic began flowing as expected. I later found a VERY SERIOUS problem however. The ‘vyos’ user now had the default password of ‘vyos’, allowing anyone to login to the box with a default password.
This is 100% not the case on the pre-upgrade box (Confirmed by snapshot)
Looking into what might have happened, I notice two things:
Comparing my pre-upgrade config to my post-upgrade config, there is indeed some sort of syntax change that happened. The encrypted password now starts with ‘$6$rounds=656000’, where as it did not include the ‘rounds’ before.
Pre-Upgrade:
set system login user vyos authentication encrypted-password ‘$6$xxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxx’
set system login user vyos authentication plaintext-password ‘’
Post Upgrade:
set system login user vyos authentication encrypted-password ‘$6$rounds=656000$yyyyyyyyyyyyyyyyyyyy.yyyyyyyyy’
The second thing I noticed is that the pre-upgrade for some reason had two password lines for the ‘vyos’ user. It had the normal encrypted line, but then also had a plain-text line for reasons unknown. Maybe this is related? The end result was that the previous configuration had a strong password for the ‘vyos’ user, and the post-update configuration was wide open and exposed. I don’t know why the previous configuration had the extra plain-text line, but if anyone else had this too, your configuration may now be wide open to compromise.
My best guess of what likely happened is that it basically processed the commands twice, once setting the password to the encrypted string because it was first, then a second time, using the plain-text of null, which set the encrypted string to default. The final configuration then only contained the encrypted string, because that is all that should actually be there anyways.
This is really concerning as I may have very well not noticed this at all. I could have upgraded the system, logged back in with my own PERSONAL user, tested that everything on the network was working, and called the upgrade a success. Months later, the system has been fully compromised by the default password, the company has been pwnd, and I get fired for leaving a default password configured, even though I never did.
Once fixed, this probably deserves new ISOs to be pushed to prevent production systems from being compromised on upgrade.