{"action":"opened","issue":{"url":"https://api.github.com/repos/contao/core/issues/8594","repository_url":"https://api.github.com/repos/contao/core","labels_url":"https://api.github.com/repos/contao/core/issues/8594/labels{/name}","comments_url":"https://api.github.com/repos/contao/core/issues/8594/comments","events_url":"https://api.github.com/repos/contao/core/issues/8594/events","html_url":"https://github.com/contao/core/issues/8594","id":195030204,"number":8594,"title":"XSS vulnerability due to missing character encoding","user":{"login":"pgerundt","id":5212300,"avatar_url":"https://avatars.githubusercontent.com/u/5212300?v=3","gravatar_id":"","url":"https://api.github.com/users/pgerundt","html_url":"https://github.com/pgerundt","followers_url":"https://api.github.com/users/pgerundt/followers","following_url":"https://api.github.com/users/pgerundt/following{/other_user}","gists_url":"https://api.github.com/users/pgerundt/gists{/gist_id}","starred_url":"https://api.github.com/users/pgerundt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pgerundt/subscriptions","organizations_url":"https://api.github.com/users/pgerundt/orgs","repos_url":"https://api.github.com/users/pgerundt/repos","events_url":"https://api.github.com/users/pgerundt/events{/privacy}","received_events_url":"https://api.github.com/users/pgerundt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-12T17:07:50Z","updated_at":"2016-12-12T17:07:50Z","closed_at":null,"body":"(I'm sorry, this is my first issue report.)\r\n\r\nThere is a XSS vulnerability in the method `validate()` of the following classes (Contao 3.5.19 LTS):\r\n```\r\n/system/modules/core/forms/FormCheckBox.php\r\n/system/modules/core/forms/FormRadioButton.php\r\n/system/modules/core/forms/FormSelectMenu.php\r\n```\r\n\r\nThe post data should be HTML encoded before displaying as an error message:\r\n\r\n`$this->addError(sprintf($GLOBALS['TL_LANG']['ERR']['invalid'], (is_array($varInput) ? implode(', ', $varInput) : $varInput)));`\r\nshould be changed to\r\n`$this->addError(sprintf($GLOBALS['TL_LANG']['ERR']['invalid'], (is_array($varInput) ? implode(', ', htmlentities($varInput)) : htmlentities($varInput))));`\r\n\r\nOtherwise, post data of checkboxes, radio buttons or select fields could contain invalid data like\r\n`<script>alert('xss');</script>`\r\nwhich would open up an alert box.\r\n\r\nThanx,\r\nPascal"}}
{"actor":{"display_login":"pgerundt"}}