CodeIgniter Forums

Full Version: Potential exploit in CSRF protection
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

I'm working on a site, and just started using the CSRF provided by CI. After enabling it, I've tested the site again with Acunetix Vulnerability Scanner. The result: a potential CSS attack.
Quote:The Cookie variable ci_csrf_token has been set to >">[removed]alert(409371738445);[removed].
Note: the [removed] bit is <_ScRiPt
> (without the _) and corresponding close tag.

On submit, it then echos the submitted CSRF_token, which breaks HTML. Shouldn't it be run through htmlspecialchars() or htmlentities()?