---
"title": "Rails Security Vulnerability: Update Required"
"description": "A serious security vulnerability has been found in the Ruby on Rails framework. This exploit affects nearly all applications running Rails and a patch has."
"date": "2013-01-11"
"authors":
  -
    "name": "Mark McGranaghan"
"url": "https://wp-www-staging.heroku.com/blog/rails_security_vulnerability/"
"categories":
  - "News"
"tags":
  - "Rails"
  - "Security"
---

# Rails Security Vulnerability: Update Required

A [serious security vulnerability](https://rubyonrails.org/2013/1/8/Rails-3-2-11-3-1-10-3-0-19-and-2-3-15-have-been-released) has been found in the [Ruby on Rails](https://rubyonrails.org/) framework. This exploit affects nearly all applications running Rails and a patch has been made available. Rails developers can get a full list of all your affected Heroku applications by following instructions [here](https://github.com/heroku/heroku-CVE-2013-0156). Please address this security vulnerability by immediately upgrading your affected apps to any of the safe versions of Rails listed below. The following Rails versions have been patched and deemed safe from this exploit:

- 3.2.11
- 3.1.10
- 3.0.19
- 2.3.15

**If you do not upgrade, an attacker can trivially gain access to your application, its data, and run arbitrary code or commands. Heroku recommends upgrading to a patched version immediately.**

## [How to Upgrade:](#how-to-upgrade)

Open the Gemfile in the affected application and change the Rails version to one listed above:

```
rails '3.2.11'
```

Then run:

```
$ bundle update rails
```

Then commit the results to git, and push to Heroku:

```
$ git commit -am "Bundle update rails"
$ git push heroku master
```

Repeat for any susceptible applications. If you cannot upgrade at this time, please consider enabling maintenance mode or scaling your app down to zero dynos.

```
$ heroku maintenance:on -a APPNAME
$ heroku scale web=0 -a APPNAME
```

Any applications running an insecure version are at risk.