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
Plugin Security
Search
Brad Parbs
July 26, 2014
Technology
180
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Plugin Security
Brad Parbs
July 26, 2014
Transcript
45 slides
Security for Your Plugins
I’m Brad Parbs.
Nathan, you should watch Band of Brothers.
Let’s talk about what sucks in WordPress.
None
None
“20% of the 50 most popular WordPress plugins are vulnerable
to common Web attacks. This amounts to nearly 8 million downloads of vulnerable plugins.” Checkmarx, an application security company
Things that happen when your stuff isn’t secure.
None
How do we make sure this doesn’t happen?
Always develop with debugging ON
define( 'WP_DEBUG', true ); define( 'WP_DEBUG_DISPLAY', false );
define( 'WP_DEBUG_LOG', true ); define( 'SCRIPT_DEBUG', true ); define( 'WP_CACHE', false );
Sanitize all the things
intval(); absint();
wp_kses();
sanitize_title();
sanitize_email() sanitize_file_name() sanitize_html_class() sanitize_key() sanitize_meta()
sanitize_mime_type() sanitize_option() sanitize_sql_orderby() sanitize_post_field() sanitize_text_field() sanitize_title() sanitize_title_for_query() sanitize_title_with_dashes() sanitize_user()
Escape all the things
esc_html();
esc_textarea();
esc_attr();
esc_url();
http://codex.wordpress.org/Data_Validation
Database Queries
$wpdb-‐>insert();
$wpdb-‐>update();
$wpdb-‐>prepare();
Nonces
wp_nonce_url();
wp_nonce_field();
wp_create_nonce();
check_admin_referer();
wp_verify_nonce();
Remote Data
CURL is bad.
For real, CURL is bad.
wp_remote_get();
wp_remote_post();
wp_remote_request();
Check capabilities & roles
current_user_can();
Use native functions
A story about TimThumb
Questions?
None
More Decks by Brad Parbs
See All by Brad Parbs
Learn to Love the Terminal
bradp
0
770
Extremely Powerful Local WordPress Development with Vagrant and Friends
bradp
1
210
Extremely Powerful Local WordPress Development with Vagrant and Friends - WordCamp Grand Rapids 2014
bradp
1
380
Web414 - Writing Clean, Clear, & Semantic Markup with HTML5
bradp
0
460
WordCamp Baltimore - Let's Get Sassy!
bradp
2
560
Starter Themes for Appleton WordPress Meetup
bradp
1
240
#WCGR - Getting SASSy
bradp
4
320
#WCPVD - Getting SASSy
bradp
2
340
WordCamp Chicago 2013 - Template Hiearchy
bradp
1
210
Other Decks in Technology
See All in Technology
20261119_AgentCore
takuyay0ne
2
360
AI時代の開発組織における、QAの体制とロールの再設計
sansantech
PRO
0
140
リリースしたで終わらない。 観測できるフロントエンド開発
yamakenji24
4
2k
ブース設計、 お前もプロダクトだったのか / So Booth Design Was a Product All Along
akihiro0038
0
200
ノードが消える前提で設計する!Karpenterで金融システムを止めないためのノウハウ大全
daitak
1
270
みん強Lightning! データ基盤ひとりでできるかな
endonanana
0
300
Webメール開発を大幅に変えたJMAPというゲームチェンジャー
tascript
10
6.4k
セキュリティチームは どのコンテナイメージの脆弱性対応を優先すべきか 〜CISA新指針とSCCで作る脆弱性トリアージ〜
swdtkuy
0
380
全てを疑え!非自明な挙動と異常系から考える堅牢なカスタムコントローラ開発入門(CNDW2026)
lycorptech_jp
PRO
0
130
本の挿絵に困ったから挿絵メーカーを自作した
yoshimura_datam
1
140
LLMごとの文章力を測ってみた話
yoshimura_datam
0
140
統制されたID・権限をどう利用するか : DPoP/FAPIによるAPIセキュリティ強化
oidfj
2
380
Featured
See All Featured
Music & Morning Musume
bryan
48
7.5k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
1
320
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
6
970
Well, that’s weird…
csswizardry
3
270
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
640
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
760
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.3k
How to Talk to Developers About Accessibility
jct
2
630
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.7k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.2k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.8k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.2k