This is probably a silly question. Could someone potentially use a short code injection attack?
What is stopping someone from injecting something like this?
[shortcode]Do something[/shortcode]
I am sure that WP already thought about this but I am just wondering, what security mechanism stops this type of injection attack?
do_shortcode
on the output, for example, if it is a guest-submitted post content, the shortcode will be parsed becausethe_content
filter hasdo_shortcode
hooked. Also it has to do with the callback that generates your shortcode (e.g checking for current user roles, etc)