> For clean Markdown of this page, append .md to its URL. For the complete documentation index, see https://www.superagent.sh/llms.txt.


Assess Ruby2Shell exposure in Ruby applications, including Rails, Sinatra, and self-managed GitLab.

# Ruby2Shell testing for web applications


[← Back to attack scenarios](https://www.superagent.sh/docs/products/red-teaming/attack-scenarios)

Ruby2Shell refers to a memory safety flaw in Ruby's string case conversion that can lead to remote code execution. This scenario focuses on exposure in a deployed Ruby application, including Rails, Sinatra, and custom Ruby services.

The Ruby runtime version and the behavior reachable through the running application both matter. The report distinguishes suspected exposure from evidence of impact on the application. Check Ruby's advisory for affected versions and available fixes.

For source and runtime configuration review, see [Ruby2Shell testing for repositories](https://www.superagent.sh/docs/products/red-teaming/attack-scenarios/ruby2shell-repositories).

CVE-2026-132825 is the CVE alias for Ruby's GHSA-34m4-m9fh-gqp5. [GitLab's November 20, 2026 patch advisory](https://docs.gitlab.com/releases/patches/patch-release-gitlab-19-6-1-released) identifies affected GitLab Community Edition and Enterprise Edition release lines as versions before **19.4.10**, **19.5 before 19.5.8**, and **19.6 before 19.6.1**. The fixed releases are **19.4.10, 19.5.8, and 19.6.1**. Official Linux packages and container images include patched Ruby. Self-compiled installations must rebuild the Ruby used to run GitLab with **3.3.14 or 3.4.13**, or a later release in the same minor series. Updating GitLab source or an unrelated system Ruby does not establish that the running application is fixed.

Verify the actual runtime and any vendor backport, then compare the original reproduction against a healthy corrected application. These version ranges provide exposure and remediation guidance; they do not prove a reachable code-execution path. Keep input encoding, baseline and negative controls, and the existing independent verification requirements. Memory-corruption testing requires explicitly authorized disposable fixtures and supported drivers; missing setup remains blocked and unresolved impact remains inconclusive. This guidance does not authorize testing GitLab.com or other public deployments.

The app lists this scenario as **Ruby2Shell — Ruby application code execution** (`APP-18`) in [Application Red Teaming](https://www.superagent.sh/docs/products/red-teaming/applications).

## Standards and guidance

[Ruby security advisory GHSA-34m4-m9fh-gqp5](https://github.com/ruby/ruby/security/advisories/GHSA-34m4-m9fh-gqp5)

[GitLab critical patch release and self-compiled Ruby guidance](https://docs.gitlab.com/releases/patches/patch-release-gitlab-19-6-1-released)

---
Source: https://www.superagent.sh/docs/products/red-teaming/attack-scenarios/ruby2shell-applications
Index: https://www.superagent.sh/llms.txt
