Symbol DoS vulnerability in Active Record

2013.03.19
Risk: Medium
Local: No
Remote: Yes
CWE: CWE-20


CVSS Base Score: 5/10
Impact Subscore: 2.9/10
Exploitability Subscore: 10/10
Exploit range: Remote
Attack complexity: Low
Authentication: No required
Confidentiality impact: None
Integrity impact: None
Availability impact: Partial

Symbol DoS vulnerability in Active Record There is a symbol DoS vulnerability in Active Record. This vulnerability has been assigned the CVE identifier CVE-2013-1854. Versions Affected: 3.2.x, 3.1.x, 2.3.x Not affected: 3.0.x Fixed Versions: 3.2.13, 3.1.12, 2.3.18 Impact ------ When a hash is provided as the find value for a query, the keys of the hash may be converted to symbols. In this example, User.where(:name => { 'foo' => 'bar' }) the string 'foo' will be converted to a symbol. Impacted code will look something like this: User.where(:name => params[:name]) Carefully crafted requests can coerce `params[:name]` to return a hash, and the keys to that hash may be converted to symbols. All users running an affected release should either upgrade or use one of the work arounds immediately. Releases -------- The 3.2.13 and 3.1.12 releases are available at the normal locations. Workarounds ----------- To work around this problem, change code that looks like this: User.where(:name => params[:name]) to code like this: User.where(:name => params[:name].to_s) Patches ------- To aid users who aren't able to upgrade immediately we have provided patches for the two supported release series. They are in git-am format and consist of a single changeset. * 3-2-attribute_symbols.patch - Patch for 3.2 series * 3-1-attribute_symbols.patch - Patch for 3.1 series * 2-3-attribute_symbols.patch - Patch for 2.3 series Please note that only the 3.1.x and 3.2.x series are supported at present. Users of earlier unsupported releases are advised to upgrade as soon as possible as we cannot guarantee the continued availability of security fixes for unsupported releases. Credits ------- Thanks to Ben Murphy for reporting this! -- Aaron Patterson http://tenderlovemaking.com/

References:

http://tenderlovemaking.com/
http://seclists.org/oss-sec/2013/q1/678


Vote for this issue:
50%
50%


 

Thanks for you vote!


 

Thanks for you comment!
Your message is in quarantine 48 hours.

Comment it here.


(*) - required fields.  
{{ x.nick }} | Date: {{ x.ux * 1000 | date:'yyyy-MM-dd' }} {{ x.ux * 1000 | date:'HH:mm' }} CET+1
{{ x.comment }}

Copyright 2024, cxsecurity.com

 

Back to Top