r/programming • • 2d ago

Ruby2Shell

https://verialabs.com/ruby2shell/
173 Upvotes

42 comments sorted by

79

u/Pierma 2d ago

I just had a painful 16 production machines update day becuase ß uppercased is SS??????????

27

u/simon_o 2d ago

Even the more modern uppercasing to ẞ would not have helped in this case, though. :-(

(Not that it would have been possible on these legacy character encodings.)

13

u/vytah 2d ago edited 2d ago

There are tons of characters that uppercase to more characters, ß is just the most common one.

EDIT: That being said, ß seems to be the only one present and affected in the affected encodings.

24

u/RippedRaven8055 2d ago

Ah scheiße! Here we go again

310

u/razialx 2d ago

And you get a 2shell! And you get a 2shell!!! Everybody gets a 2shell!!!!!!

103

u/KaMaFour 2d ago

Java got a 4shell

35

u/razialx 2d ago

Waiting for Fortran2Shell to drop

12

u/fripletister 2d ago

QBASIC2Shell

8

u/razialx 2d ago

My first language!

0

u/0x53r3n17y 2d ago

Mabolge2Shell

2

u/dlanod 2d ago

Staring at the 1000+ Fortran files in our codebase and shuddering...

1

u/razialx 2d ago

You gotta pump up those numbers!

7

u/blake_ch 2d ago

And what about the 3shells?

3

u/oORocketOo 1d ago

No one knows how to use them

1

u/lylesback2 21h ago

3 is too predictable as a number. So 4 was used. No one would ever guess the number 4.

1

u/CafeSleepy 19h ago

She sells 3shells…

1

u/__konrad 2d ago

It should be Shell4J

1

u/Bemteb 2h ago

When 5shell?

-13

u/Imaginary-Roll-5665 2d ago

I am a recent grad, tbh i do not know to code and have only vibecoded bs. I actually never saw projects to end and just initial vibe codes. Now that i graduated i realised how fucked i am.

I am unable to decide what to learn n now. Do i learn manual coding so that i can build stuff without ai and then use ai to accelerate. Or do i just learn to prompt better somehow. But how do i prompt better if i do not know what direction do i take the project apart from the vague output i have in mind. How do i get engineering part

51

u/RustOnTheEdge 2d ago

I really struggle how you can do remote code execution by writing a single, predetermined byte out of bounds. Can anyone explain that to me? I just don’t see how this is realistically exploitable?

23

u/He_Who_Browses_RDT 2d ago

I remember reading the "smashing the stack for fun and profit" in the 90's. I can still recommend it in 2026.

You'll get a better understanding of it.

6

u/RustOnTheEdge 2d ago

Thanks for the tip!

19

u/freddylmao 2d ago

You can control the length of the buffer. This means that this is a primitive for writing one byte at a time, from finish to start. It is likely difficult to set up a shell using this, unless you are keenly aware of the memory layout on the server. My guess is that you'd have to rely on some coincidence between the letters 'S' and 's' and some architecture's bytecode.

45

u/gwillen 2d ago

It's possible the exploitability is overstated. People are prone to that. It may be exploitable only under hypothetical or unrealistic conditions. You might be surprised, though.

46

u/GoldenShackles 2d ago

Unfortunately this is where AI excels. These types of issues used to be flagged as lower priority issues because on careful examination from expert devs, they couldn't see a way it could be exploited.

11

u/coriandor 2d ago

It's not one byte. It's one byte per ß. The writeup says the buffer is allocated as len + 20, so you need 21 ßs to overflow 1 byte. Make that "ß*100<payload>", and you've pushed your payload 80 bytes past the buffer.

2

u/fakehalo 1d ago

Its confusing, because looking at the code snippet itself it appears like the while(to<to_len) check iterating through each character would still only allow this the be a single byte overflowing the very last iteration.. since the *to++ is happening/incrementing 2 times each loop to keep the check (except for the very last one)

22

u/Skellicious 2d ago

Yeah I'm sceptical too. It's probably possible in some way or another, but it's also "CVE pending" so there's no score however flawed those scores may be.

But better give it a 2shell name for some attention before the risk factor is even evaluated.

5

u/red75prime 2d ago

We'll be publishing a proof of concept demonstrating remote code execution on stock Rails on 25 November 2026, or later if major vendors have not shipped a fix by then.

What are you skeptical about, specifically?

2

u/drdavidawheeler 1d ago

Hi, I work for the Open Source Security Foundation (OpenSSF) on security. It's *possible* it isn't really exploitable. However, that is *not* where I would place my bet. This kind of vulnerability (ability to write a single byte out of bounds at will) has turned into practical exploits before, so attackers already have patterns to learn from, and the best AI models are now *really* good at chaining together "minor defects" into a full remote code execution (RCE). I think the "right thing" to do now is to make it *easy* to update your software (including your dependencies) and make sure it passes a good test suite. If you get an update that says "please update for this vulnerability, I've already verified your thorough test suite passes", it's easy to accept. If you have to do a lot of manual analysis, you've already lost before you begin. There are going to be a LOT more vulnerabilities found in software. Now is the time to get ready for the updates.

19

u/arcrad 2d ago

DeezNuts2Shell

7

u/sblinn 2d ago edited 1d ago

Destination: hell

Ruby ruby ruby ruby 2 shell

15

u/ScottContini 2d ago

WARNING: Do not enter https://ruby2shell.com in your browser. Just don’t do it.

6

u/jigarthanda-paal 2d ago

You f*ck

5

u/FickleQuail8944 2d ago

What happened?

4

u/ScottContini 2d ago

I could tell you, but you wouldn't like it.

2

u/maifee 1d ago

Waiting for shell2shell now

3

u/ungemutlich 1d ago

https://sshhole.com/ instead of secure shell 2 shell, but there you go

4

u/zombiecalypse 2d ago

2shells1cup

1

u/this_knee 2d ago

Oh come on!

1

u/Darmo_ 3h ago

ßhell lol someone doesn't know what ß is