News for hackers. Stuff that matters.
Re:Multiple vulnerabilities in Regexp and String case conver... by tptacek on Wednesday November 18, 2026 @08:18PM (#50554822)
There's what I think is probably an awesome bug here.

Windows-1252 encoding has a representation for lowercase German sharp 's' (ß), but not one for the uppercase. If you upcase a string containing a sharp 's', it gets normalized to "SS", which increases the length of the string by one character. The 1252 case conversion code doesn't handle this; it looks like it checks for headroom in the buffer one character at a time. So if the last character of a string you upcase is ß, it looks like you get a one-byte overflow (of 'S').

If that's really the bug (there's a claimed RCE POC), the heap grooming for it must be really fussy! I couldn't find any other character pairs that expand like this.

You can feed strings in 1252 to a Rails program through multipart POSTs, which get to pick their encodings.

The great thing about this bug, apart from how it illustrates how doomed we all are (if I'm right), is that it should by rights have the best vulnerability name of the year, because you get to work 'ß' into it.

Re:Multiple vulnerabilities in Regexp and String case conver... by cowlevel on Wednesday November 18, 2026 @08:23PM (#50554871)
Unicode also has this feature because SS is the correct uppercase form of ß
Re:Multiple vulnerabilities in Regexp and String case conver... by p-e-w on Wednesday November 18, 2026 @09:27PM (#50555314)
It’s not. There are multiple uppercase forms, including “SS”, “SZ”, and the uppercase ß character, all of which are well-established, which makes all of them correct according to the principle of linguistic descriptivism.
Re:Multiple vulnerabilities in Regexp and String case conver... by Georgelemental on Wednesday November 18, 2026 @10:18PM (#50555620)
But according to the "principle" of blindly following the Unicode standard with no tailoring, the "correct" form is SS. (And Unicode's stability guarantees preclude ever changing it to ẞ)
Re:Multiple vulnerabilities in Regexp and String case conver... by edflsafoiewq on Wednesday November 18, 2026 @10:32PM (#50555736)
>And Unicode's stability guarantees preclude ever changing it to ẞ

This seems like a bad property for a system that encodes human writing systems.

Re:Multiple vulnerabilities in Regexp and String case conver... by pmontra on Wednesday November 18, 2026 @11:02PM (#50555935)
Human writing systems themselves have that very same property. The stability of written language prevents them to adapt swiftly to changes to spoken language.

Knight / night is an example for English. That k should be gone, right? Or all those silent -ment and e in French.

Enter the computer and I'm not surprised that German speakers end up mostly with SS because that's what computers do when automatically upcasing words.

A lot of spelling changes are dictated by what's available on keyboards. In Italian we accept E' as È because we don't have that upper case character on our keyboard. Automatic uppercase on start of sentences fixed it where it's available and mobile keywords show an È as an option of you long press a shifted e. But what if you are writing Italian in an English locale form field with a hardware keyboard (here with an OS with English locale) or you have to write È in the middle of a sentence or, go back 30 or 40 years, you have to use a typing machine?

I'm am sure that every language that had to go through a phase of adapting to ASCII and to the limits on the layout of keyboards has similar stories to tell.

Re:Multiple vulnerabilities in Regexp and String case conver... by eviks on Wednesday November 18, 2026 @10:54PM (#50555883)
What stops you from blindly following the standard with tailoring?
Re:Multiple vulnerabilities in Regexp and String case conver... by ben-schaaf on Wednesday November 18, 2026 @11:41PM (#50556150)
And according to linguistic perscriptivism, the upper case of ß is ẞ since 2017.
Re:Multiple vulnerabilities in Regexp and String case conver... by frangonf on Wednesday November 18, 2026 @09:29PM (#50555324)
Or so the Germans would have us believe...
Re:Multiple vulnerabilities in Regexp and String case conver... by sscaryterry on Wednesday November 18, 2026 @09:41PM (#50555400)
Who cares, I use ASCII :)
Re:Multiple vulnerabilities in Regexp and String case conver... by SoftTalker on Thursday November 19, 2026 @12:48AM (#50556493)
I've been saying that for years.
Re:Multiple vulnerabilities in Regexp and String case conver... by eviks on Wednesday November 18, 2026 @10:57PM (#50555898)
Not only that, when you uppercase 1 char with precomposed diacritics, but uppercase doesn't have precomposed diacritics, so they expand into separate chars (max is 1 to 3 chars)

Both fixable, but as with a lot of Unicode stuff, might take a long while

Re:Multiple vulnerabilities in Regexp and String case conver... by xp84 on Wednesday November 18, 2026 @08:35PM (#50554981)
Should we call it #upcaße2Shell?
Re:Multiple vulnerabilities in Regexp and String case conver... by tptacek on Wednesday November 18, 2026 @08:39PM (#50555012)
One of the discoverers suggested, on Twitter, Ruby2ßhell. My wife, who speaks and writes German, refused to entertain this.
Re:Multiple vulnerabilities in Regexp and String case conver... by testplzignore on Wednesday November 18, 2026 @08:44PM (#50555044)
I wonder if there is a similar bug for U+0130 which (I think) expands to two characters when lowercased.
Re:Multiple vulnerabilities in Regexp and String case conver... by tptacek on Wednesday November 18, 2026 @08:46PM (#50555057)
Maybe somewhere! But that character isn't in Windows-1252 at all, so it can't trip this string counting bug.
Re:Multiple vulnerabilities in Regexp and String case conver... by throw-the-towel on Thursday November 19, 2026 @01:10AM (#50556616)
Wait, why would the Turkish dotted uppercase I expand to two characters?
Re:Multiple vulnerabilities in Regexp and String case conver... by bee_rider on Wednesday November 18, 2026 @09:00PM (#50555152)
Haha, that exact character caused problems in a programming class I tutored for. Got to throw the first year students some curveballs.
Re:Multiple vulnerabilities in Regexp and String case conver... by watersb on Wednesday November 18, 2026 @10:32PM (#50555741)
> it should by rights have the best vulnerability name of the year, because you get to work 'ß' into it.

Holy sh!t

Re:Multiple vulnerabilities in Regexp and String case conver... by juliusdavies on Wednesday November 18, 2026 @11:12PM (#50555990)
Holy Scheiße
Re:Multiple vulnerabilities in Regexp and String case conver... by kps on Wednesday November 18, 2026 @11:07PM (#50555966)
values of ß will give rise to dom
Re:Multiple vulnerabilities in Regexp and String case conver... by dwattttt on Wednesday November 18, 2026 @11:33PM (#50556114)
As is tradition, Raymond Chen has had something to say about this. The windows-1252 code page was introduced with Windows 1.0, and according to Wikipedia its final version shipped with Win98. String operations are just plain too hard.

https://devblogs.microsoft.com/oldnewthing/20200804-00/?p=10...

https://devblogs.microsoft.com/oldnewthing/20241007-00/?p=11...

Re:Multiple vulnerabilities in Regexp and String case conver... by tptacek on Thursday November 19, 2026 @12:22AM (#50556367)
There is no good reason for really any Rails app to accept Windows-1252! This is reminiscent of the YAML vulnerability, which surprised most Rails users with the fact that Rails endpoints all accepted YAML to begin with.
Re:Multiple vulnerabilities in Regexp and String case conver... by timcobb on Thursday November 19, 2026 @01:12AM (#50556628)
What if I am reading old ID3 tags and posting them verbatim to my rails app? Should I be detecting encodings and converting to utf8 before rails?
Re:Multiple vulnerabilities in Regexp and String case conver... by throw-the-towel on Thursday November 19, 2026 @01:16AM (#50556649)
Why not?
Re:Multiple vulnerabilities in Regexp and String case conver... by throw-the-towel on Thursday November 19, 2026 @01:16AM (#50556648)
I'm mortified by the second article, C++ really is Lovecraftian-level insanity.