News for hackers. Stuff that matters.
Re:Postmortem: TanStack npm supply-chain compromise by lrvick on Tuesday May 12, 2026 @06:12AM (#48106236)
Neither would actually help in this case though. Malware could manipulate both of those as an unprivileged user to run malicious code the next time you elevate privileges.

Remember that malware can replace or modify your shell

Re:Postmortem: TanStack npm supply-chain compromise by FooBarWidget on Tuesday May 12, 2026 @08:06AM (#48107092)
No? The shell must be listed in /etc/shells, it can't be an arbitrary command. And after elevating privileges you have to run the malware (which could only be written to home or tmp) for it to work, but sudo already scrubs the environment.

So the main danger is that you're not running the real sudo.

I have an idea that I hope to implement one day to make sudo actually secure:

1. Authenticate with passkeys (webauthn) instead of passwords.

2. Sudo can only run an interactive root shell, not arbitrary commands. The session is time-bound, and the TTY output is recorded for auditing purposes.

This combination makes intercepting sudo largely useless. Passkey authentication cannot be replayed or relayed. The fact that sudo can only open an interactive shell makes it impossible for a sudo wrapper to pass a malicious to sudo. This way we're not dependend on whether the unprivileged shell is secured properly. It also solves approval fatigue (compared to running sudo separately for every command).