Data Injection Affecting activerecord package, versions >=4.1.0.beta1, <4.1.0.beta2 >=3.2.0, <4.0.3

  • Attack Complexity


  • User Interaction


Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • snyk-id


  • published

    17 Feb 2014

  • disclosed

    17 Feb 2014

  • credit

    Godfrey Chan

How to fix?

Upgrade activerecord to versions 4.1.0.beta2, 4.0.3 or higher.


ActiveRecord is the Object-Relational Mapping (ORM) that comes out-of-the-box with Rails. It plays the role of Model in the MVC architecture employed by Rails.

Affected versions of this package are vulnerable to Data Injection via the connection_adapters/postgresql/cast.rb method. Specially crafted strings can be used to save data in PostgreSQL array columns that may not be intended. This vulnerability cannot be used to delete data or execute arbitrary SQL statements, but can be used to add data that could have an impact on the application (such as setting an admin flag). Only array type columns in PostgreSQL are impacted.