In a discussion titled “User input validation” under the Dev category, Cal inquired about implementing custom validation for new users, admin badges, and user fields to mitigate HTML injection vulnerabilities discovered during a penetration test. neounix suggested writing a plugin or posting the request in Marketplace. pfaffman and fzngagan asked for clarification on which fields are vulnerable. Jonathan5 questioned whether Discourse participates in a bug bounty program, which Benjamin_D confirmed via HackerOne. Cal listed the affected parameters: user creation (name, title, location, bio_raw), badges (name, description, long_description), and user fields (name, description). merefield advised caution, noting that Discourse’s security practices may already address the issue. pfaffman expressed skepticism and requested a demonstration. Finally, Johani welcomed Cal and clarified that all mentioned fields are sanitized and protected by CSP, and invited any confirmed vulnerabilities to be reported via HackerOne. The consensus is that Discourse’s built-in protections likely mitigate the reported risks, and any genuine exploits should be responsibly disclosed.
Does anyone know if it’s possible to implement custom user input validation, specifically for new users, new admin badges and new user fields.
After a penetration test we found we are vulnerable to HTML Injection and other malicious inputs in these areas and wondered if there is a way to further validate these inputs to improve security (possibly by using regex or another way to achieve the same result)
We are part of the community but not staff. You would need to a get a response from them on this. However, given the attention paid to vulnerabilities and security by the team, plus the use of industry standard frameworks, I would reserve judgement until they’ve had time to respond.
This doesn’t sound like something you should need to mitigate, but at the same time, it may already be addressed in some way.