3.6.6.1
🚨 Security release
Cross-site scripting (XSS) from content entered in the tags and multiselect fields
Severity: high (CVSS score 7.1)
The tags and multiselect fields allow to select tags from an autocompleted list. The tags field also allows to enter new tags or edit existing tags. Kirby already handled escaping of the autocompleted tags, but unfortunately the Panel used HTML rendering for new or edited tags as well as for custom tags from the content file.
This allowed attackers with Panel access to store malicious HTML code in a tag. The browser of the victim who visited the modified page in the Panel will then have rendered this malicious HTML code.
It also allowed self-inflicted XSS attacks in the tags field (meaning that malicious code is executed in the browser of the user who entered it). This could be used in social engineering attacks where a victim is convinced by an attacker to enter malicious code into a tags field.
Visitors without Panel access could only use this attack vector if your site allows changing the content of a tags or multiselect field from a frontend form (for example user self-registration or the creation of pages from a contact or other frontend form). If you validate or sanitize the provided form data, you are already protected against such attacks by external visitors.
You are also not affected by these vulnerabilities if your site doesn't have untrustworthy users with Panel access or a way to modify field values from the frontend or if you don't use the tags or multiselect fields.
Note: The fixes for these vulnerabilities have the side effect that values in the tags and multiselect fields that come from dynamic options are displayed with double escaping (e.g. the &
character is displayed as &
). We will fix the double escaping issues with a refactoring of the options fields (tags, multiselect, checkboxes, radio, select and toggles) in Kirby 3.8.