Menu

#32 XSS hole in [acronym] tag

open
nobody
Bug fix (25)
9
2012-01-16
2012-01-16
Anonymous
No

The default parameter in acronym allows user to escape the current tag and input whatever html content he desires, as the acronym tag doesn't have any allow rule or doesn't do any formatting/escaping to it, exposing the site for an XSS attack.

Usage:

[acronym="><script>alert('hello');</script>[/acronym]

Fix:

Replace {$_default} with {$_default/h} for the rule in nbbc_lib.php (line 198) and/or add allow only word characters to be used there via the allow parameter. I would also add 'content' => BBCODE_REQUIRED as I see no benefit from allowing acronym tags without content

Discussion

  • Anonymous

    Anonymous - 2012-01-16
    • summary: XSS Hole in [acronym] tag --> XSS hole in [acronym] tag

    Edit: I couldn't figure out how to add a post, but edit was allowed...

    I think this is fixed in 1.4.5.

     

    Last edit: Anonymous 2014-08-23

Log in to post a comment.

MongoDB Logo MongoDB