candy icon indicating copy to clipboard operation
candy copied to clipboard

Use a whitelist for XHTML-IM elements and attributes

Open linkmauve opened this issue 8 years ago • 3 comments

The current method makes it trivial to execute scripts for any attacker, e.g. by sending <img src="something" onerror="alert('Hello XSS')"/> in a room.

http://xmpp.org/extensions/xep-0071.html defines a subset of elements alongside their attributes, I highly recommend you to whitelist only those and to ignore any other element or attribute you come across.

linkmauve avatar Nov 28 '15 14:11 linkmauve

Thank you for the report @linkmauve. Do you think you might be able to propose a fix?

benlangfeld avatar Nov 28 '15 23:11 benlangfeld

Can you confirm if this was fixed? If so, a link to the commit and/or fixing version? Also if this is related to https://github.com/candy-chat/candy/issues/498?

attritionorg avatar Jul 14 '17 02:07 attritionorg

No-one has yet proposed a fix.

benlangfeld avatar Jul 14 '17 12:07 benlangfeld