Update Ruby Now to Stop GitLab Remote Code Execution Bugs

— Cyber Security — By Gethyn Jones

Old Ruby versions let crafted regexes compromise GitLab – update today to keep your servers safe.

Verdict: If you run any Ruby‑based service – GitLab included – you must upgrade your Ruby interpreter right now or risk an attacker taking control of your server. What’s the actual risk and why does it matter for a small business? The three bugs sit in Onigmo, the regular‑expression engine Ruby ships with. A specially‑crafted pattern can corrupt memory while Ruby compiles the regex, giving the attacker arbitrary code execution on the host. For a small business that uses GitLab for source control, that means a hacker could steal your code, inject ransomware, or pivot to other machines on the network. How do we check which Ruby version you’re on? We start by opening a terminal (or remote SSH session) on the server that hosts GitLab: Run ruby -v . The output will look like ruby 3.3.12p0 (2024-03-15 revision ...) if you’re already on a patched release. If the version is older – e.g. 3.3.11 or 3.4.10 – you’re vulnerable. For a quick audit across multiple machines we use a one‑liner: ssh user@host "ruby -v" and pipe the results into a spreadsheet. We also check the package source. On Debian/Ubuntu you’ll see the version in /etc/apt/sources.list.d/ruby.list , on CentOS it’s in the yum repo file. Knowing the exact package helps us pick the right update path. What’s the easiest way to patch the vulnerability? In most cases a simple package upgrade does the job. Here’s the typical flow we follow on a fresh Ubuntu 22.04 box: sudo apt update && sudo apt install ruby – this pulls the late

For expert IT support, contact CefniTech — friendly, local IT support for homes and businesses across the UK.