> 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 a deployed Ruby application, including Rails and Sinatra apps.

# 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).

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)

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