sshWhat is User2Shell?
User2Shell is a vulnerability in which a user, after successfully authenticating, gains access to a
shell. From there they can run commands, edit files, and type sudo with a confidence
that is not supported by their permissions.
Root cause
Extensive research has found exactly two root causes.
Someone gave them an SSH account
An administrator ran useradd -m -s /bin/bash intern, explicitly configured a shell,
handed over the credentials, and is now surprised the user has a shell.
Or they're the owner
The user bought the machine, installed it, and holds the root password and the receipt. Privilege escalation is impossible because there is nothing left to escalate to. There is no fix for this variant. It's called owning a computer.
In both variants, the affected component was found to be operating exactly as configured.
Proof of concept
Fully weaponized and publicly available since the 1990s.
$ ssh user@host
user@host:~$ whoami
user
user@host:~$ # exploitation complete
Earlier versions of the exploit used telnet. Researchers consider SSH a regression in exploit difficulty
but an improvement in user experience.
Am I affected? AI-powered
Affected versions: all humans since Unix v1 (1971). Run our free, client-side, zero-telemetry scanner to confirm.
Impact
Destruction
Run rm -rf in the wrong directory, with permissions legitimately granted to them.
Resource exhaustion
Fill /home with node_modules. Run a cryptominer and call it a "side project".
Persistence
Leave vim open for eleven months. Read the README (theoretical, never observed).
Choose your mitigation
Simple, transparent pricing. None of them work for Variant B.
Community
userdel -r <user>
- Complete remediation
- The user may notice
Pro
usermod -s /usr/sbin/nologin
- High effectiveness
- Ticket titled "URGENT!!!" included
- SELinux enforcing (until someone runs
setenforce 0"just to test")
Enterprise
Physical controls
- Unplug the keyboard (defeated by SSH from a phone)
- Remove the chair (defeated by standing desks)
- Annual awareness training (effectiveness not measured)
Disclosure timeline
| Day 0 | Vendor notified. |
| Day 1 | Researcher realizes the vendor is the user. |
| Day 2 | User notified themselves. No response. |
| Day 90 | Disclosure deadline passed. User still has a shell. |
| Day 91 | Domain, logo and website purchased, per industry best practice. |
Does it have a CVE?
No, and it never will. Real CVE IDs are for real vulnerabilities, and the people who handle them have enough to do. If your scanner flags this one, please check the scanner. Then check the operator.