697
another CVE (lemmy.nz)
you are viewing a single comment's thread
view the rest of the comments
[-] dbx12@programming.dev 55 points 1 week ago

I already found another one!

echo $USER prints my current user name. Once I do USER=root it shows im running as root. And I wasn't even asked for my sudo password! :O :O :O

[-] not_IO@lemmy.blahaj.zone 20 points 6 days ago
[-] dbx12@programming.dev 8 points 6 days ago

That seems like an adjacent vector, want to coop on the CVE?

[-] clb92@feddit.dk 1 points 5 days ago

Youre going to need a catchy name and a website for it as well. All the big CVEs have a website and a catchy name now.

[-] dbx12@programming.dev 1 points 13 hours ago

Let's call it shell2root, as it ~~was~~ is the style at the time.

[-] some_guy@lemmy.sdf.org 2 points 6 days ago
[-] goferking0@lemmy.sdf.org 17 points 1 week ago

You joke but at work our security office mass reset passwords because they saw a list of users in the pwd file. Even after others pointed out it was just a list of usernames not their credentials AND that it couldn't be the actual credentials as we're an AD shop

They would definitely fall for that 😭

[-] dbx12@programming.dev 5 points 6 days ago
[-] daychilde@lemmy.world 5 points 1 week ago

Huh. It is worth bearing in mind not to trust $USER before doing something based on it, though, if that thing is important.

[-] dbx12@programming.dev 3 points 6 days ago

The interesting thing is that bash allows writing this variable. I would've expected it to be readonly for obvious reasons.

[-] poolcritter@pawb.social 1 points 6 days ago

USER is just an environment variable in the environment block like any other; even if Bash didn't allow changing it, any other program could.

[-] daychilde@lemmy.world 1 points 6 days ago

Right? And while Linux generally seems to let you shoot yourself in your foot if you'd really like to, things like --no-preserve-root mean they do put SOME guardrails out there. lol. $USER seems worth making immutable. heh

this post was submitted on 21 Nov 2026
697 points (98.5% liked)

Programmer Humor

34316 readers
1496 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 3 years ago
MODERATORS