I have a WordPress plugin that reads an RSS feed and outputs it to the browser in an admin page. In the plugin, it uses the standard feed.php template from WordPress (wp-includes/feed.php), which uses SimplePie to fetch the feed through WordPress.
The page loops through the feed items and uses $item->get_title()
and $item->get_content()
to output the item title and content via a direct echo to the page.
I have had a user contact me to tell me that they had a security audit done on their site and it failed because we used the $item->get_content()
and are not escaping it before output to the browser and that this is an XSS vulnerability because HTML is being read from a vendor's website and needs to be escaped.
Is this correct?
In all the documentation for using the get_content()
function, they show echoing out the $item->get_content()
results.
Can someone shed light on this so I can best address this either with the security audit team and/or user - or update the plugin correctly if it needs to be escaped.
Thanks! Don