A vulnerable version of Rails that follows the OWASP Top 10
Alternatives To Railsgoat
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Kubernetes Goat3,581
4 days ago21mitHTML
Kubernetes Goat is a "Vulnerable by Design" cluster environment to learn and practice Kubernetes security using an interactive hands-on playground 🚀
Awesome Hacking2,570
12 days ago3Python
Awesome hacking is an awesome collection of hacking tools.
14 days ago38apache-2.0HTML
The OWASP NodeGoat project provides an environment to learn how OWASP Top 10 security risks apply to web applications developed using Node.js and how to effectively address them.
16 hours ago20C#
Full-stack .Net 7 Clean Architecture (Microservices + Dapr, Modular Monolith, Monolith), Blazor, Angular 16, React 18, Vue 3, BFF with YARP, Domain-Driven Design, CQRS, SOLID, Asp.Net Core Identity Custom Storage, OpenID Connect, Entity Framework Core, Selenium, SignalR, Hosted Services, Health Checks, Rate Limiting, Cloud (Azure, AWS) Services, ..
6 months ago3gpl-3.0HTML
vAPI is Vulnerable Adversely Programmed Interface which is Self-Hostable API that mimics OWASP API Top 10 scenarios through Exercises.
4 months ago37mitHTML
A vulnerable version of Rails that follows the OWASP Top 10
a year ago8mitCSS
Damn Vulnerable NodeJS Application
521 days ago4June 02, 201673otherRuby
Application Security Automation
Docker Security416
2 years ago14otherDockerfile
Getting a handle on container security
Devsecops Maturitymodel404
a month ago42gpl-3.0TypeScript
Alternatives To Railsgoat
Select To Compare

Alternative Project Comparisons

RailsGoat Build Status Code Climate

RailsGoat is a vulnerable version of the Ruby on Rails Framework from versions 3 to 6. It includes vulnerabilities from the OWASP Top 10, as well as some "extras" that the initial project contributors felt worthwhile to share. This project is designed to educate both developers, as well as security professionals.


If you are looking for support or troubleshooting assistance, please visit our OWASP Slack Channel.

Getting Started

To begin, if you do not have Ruby, Git, MySQL, and Postgres, we suggest using this site to install the software. Pick the appropriate operating system and follow the instructions.

After installing the above software, clone this repo:

$ git clone [email protected]:OWASP/railsgoat.git

NOTE: NOT NECESSARY IF YOU WANT TO WORK WITH RAILS 6. Otherwise, if you wish to use the Rails 3 or 4 versions, you'll need to switch branches:

$ cd railsgoat
$ git checkout rails_3_2
$ git checkout rails_4_2

Navigate into the directory (already there if you followed the previous step) and install the dependencies:

$ bundle install

If you receive an error, make sure you have bundler installed:

$ gem install bundler

Initialize the database:

$ rails db:setup

Start the Thin web server:

$ rails server

Open your favorite browser, navigate to http://localhost:3000 and start hacking!

Docker Install

To run Railsgoat with Docker you must first have Docker and Docker Compose installed. Once those dependencies are installed, cd into the Railsgoat directory where you've cloned the code and run. Rails requires Compose 1.6.0 or above and require a Docker Engine of version 1.10.0 or above.

For Mac Apple Silicon (ARM64) you must also have Rosetta install

$ docker-compose build
$ docker-compose run web rails db:setup
$ docker-compose up
  Creating railsgoat_web_1
  Attaching to railsgoat_web_1

Once you see the preceeding message Railsgoat is running on your localhost on port 3000.

Open your favorite browser, navigate to http://<dockerIP>:3000 and start hacking! The Docker IP is usually Run docker-machine env to verify.

Note: if your container exits with an error, it may be because a server is already running:

A server is already running. Check /myapp/tmp/pids/server.pid.
=> Booting Thin
=> Rails 6.0.0 application starting in development on
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server

In this case, remove that server.pid file and try again. Note also that this file is in your current working directory, not inside the container.

Capybara Tests

RailsGoat now includes a set of failing Capybara RSpecs, each one indicating that a separate vulnerability exists in the application. To run them, you first need to install PhantomJS (version 2.1.1 has been tested in Dev and on Travis CI), which is required by the Poltergeist Capybara driver. Upon installation, simply run the following task:

$ rails training

To run just one spec:

$ rails training SPEC=spec/vulnerabilities/sql_injection_spec.rb

MySQL Environment

By default in development mode Railsgoat runs with a SQLite database. There is an environment defined to use MySQL. For some of the SQL injection vulnerabilities to work you have to run the app with MySQL as the database. The following steps will setup and run Railsgoat to use MySQL. MySQL must be installed and running before running these steps

#Create the MySQL database
RAILS_ENV=mysql rails db:create

#Run the migrations against the database
RAILS_ENV=mysql rails db:migrate

#Boot Rails using MySQl
RAILS_ENV=mysql rails s

Processing Email

In order for RailsGoat to effectively process email, you will first need to run MailCatcher, an SMTP server that will intercept email messages and display them in a web interface.

Mailcatcher is not installed by default. To install MailCatcher and start an instance of it, simply run:

$ gem install mailcatcher
$ mailcatcher

If successful, you should see the following output:

Starting MailCatcher
==> smtp://
*** MailCatcher runs as a daemon by default. Go to the web interface to quit.

Alternatively, you can run MailCatcher in the foreground by running mailcatcher -f in your terminal.


Please see our contribution document to learn more. Additionally, note that as changes are made to the application, the Capybara RSpecs can be used to verify that the vulnerabilities in the application are still intact. To use them in this way, and have them change to pending instead of fail, set the RAILSGOAT_MAINTAINER environment variable.

Conversion to the OWASP Top Ten 2013 completed in November, 2013.


The MIT License (MIT)

Popular Owasp Projects
Popular Docker Projects
Popular Security Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Ruby On Rails
Application Security