Nested Attributes Rejection Bypass Affecting activerecord package, versions < 5.0.0.beta1.1, >= 4.3 < 22.214.171.124, >= 4.2 < 126.96.36.199, >= 3.2.23 < 188.8.131.52, >= 3.1
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
24 Jan 2016
24 Jan 2016
How to fix?
ActiveRecord to version 5.0.0.beta1.1, 184.108.40.206, 220.127.116.11, 18.104.22.168 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 Nested Attributes Rejection Bypass. ActiveRecord handles updates in combination with destroy flags when destroying records is disabled. Attackers could use this do things like set attributes to invalid values and to clear all of the attributes amongst other things.
When using the nested attributes feature in ActiveRecord you can prevent the destruction of associated records by passing the
allow_destroy: false option to the
accepts_nested_attributes_for method. However due to a change in the commit a9b4b5d the
_destroy flag prevents the
:reject_if proc from being called because it assumes that the record will be destroyed anyway.
However this isn't true if
:allow_destroy is false so this leads to changes that would have been rejected being applied to the record.