Vulnerabilities in Ruby that allow remote code execution

Corrective releases for the Ruby programming language versions 3.3.14, 3.4.13, and 4.0.10 have been published, addressing 7 vulnerabilities (no CVEs assigned). Exploit prototypes for remote code execution have been demonstrated for 6 of these vulnerabilities against certain projects written in Ruby (specific projects are not disclosed at this time). The vulnerabilities are due to errors in the regular expression engine and case conversion functions, affecting applications that use external data within regular expressions or that convert the case of externally obtained strings.

  • Buffer overflow of one byte in the character case conversion code, occurring when converting specially formatted strings in certain single-byte encodings such as ISO-8859-1 and Windows-1252. The issue arises because the character ß (0xDF) was being converted into a two-byte code while only enough space for one byte was allocated in the buffer.
  • Integer overflow in the case conversion code leads to writing data beyond the allocated buffer when the size of the converted string variant exceeds 4 GB. The issue is caused by using the int type to return the string size.
  • Double free in the regex compilation code, occurring when processing specially crafted regular expressions that use the "&&" operator to highlight characters present in two sets (for example, "[a-z&&[^aeiou]]" to check for consonant letters only).
  • Reading from outside the allocated buffer leads to controlled corruption of memory contents when processing regular expressions in a case-insensitive mode.
  • Integer overflow when compiling regular expressions results in a buffer overflow when processing specially crafted patterns.
  • Buffer overflow in the implementation of the Regexp#to_s method, which manifests when converting specially formatted regular expressions to a string.
  • Reading from an area outside the allocated buffer when using regular expressions with backreferences in case-insensitive mode. This vulnerability may lead to memory content leakage or process crash.

Additionally, it is worth noting that the PHP project developers have announced the release today at 17:00 (MSK) of corrective updates that fix a critical vulnerability in PHP that manifests in certain non-standard configurations.

Source: opennet.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster