Tech News
← Home  ·  All topics

Case Folding

1 GoKawiil brief on this topic · RSS for case folding

Ruby case-conversion bug enables one-byte heap overflow, pre-auth RCE in Rails

Security researchers found that Ruby's handling of the German ß character in certain single-byte encodings (used by upcase, swapcase, downcase(:fold) and casecmp?) miscalculates buffer bounds, letting an input with 21 ß characters overflow the output buffer by exactly one byte. The flaw has existed since Ruby 2.4.0 and affects only legacy ISO-8859 and Windows-125x encodings, not UTF-8 strings; it has now been patched upstream in the Ruby source repository.