Ruby contains seven memory-safety flaws in its regular expression engine and its string case-conversion code. For five of them, its maintainers say, proof-of-concept exploits, or PoCs, have shown that crafted input can run code on the machine.
"We are aware of PoCs that prove some of them can be used to trigger remote code execution," the maintainers said.
The project released fixed versions yesterday: Ruby 4.0.10, 3.4.13 and 3.3.14. Whether an application is at risk depends on whether an attacker can get crafted patterns or strings into the affected code, and the advisories report no attacks so far.
The other two flaws are weaker. The maintainers say one has proof-of-concept code that corrupts memory under an attacker's control but has not been shown to run code, and the other can only read memory it should not or crash the program.
The project set the seven out in a security announcement and a separate advisory for each. The advisories rate three flaws critical, three high, and one moderate, and say which carry the remote-code-execution PoCs. In order of severity:
The project credits Stephan Lipp of Ada Logics and Anthropic with four of the findings, and baba__yaga, aphantom, Hiroya Fujinami and Hiroshi SHIBATA with the other three.
The flaws are in Ruby's own code, so every application on an affected version carries them. Whether an attacker can reach one depends on how the application handles external input.
The regex flaws need an application that builds a regular expression from input an attacker controls and then compiles or runs it.
Source link







