# Form character limit request for prevent SQL injection ve XSS

**URL:** <https://community.hubspot.com/t/form-character-limit-request-for-prevent-sql-injection-ve-xss/34399>\
**Category:** HubSpot Ideas\
**Tags:** domains-urls, forms\
**Created:** [March 23, 2021, 7:40pm UTC](https://community.hubspot.com/t/form-character-limit-request-for-prevent-sql-injection-ve-xss/34399 "2021-03-23T19:40:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ozgesila](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ozgesila/32/64675_2.png) [@ozgesila](https://community.hubspot.com/u/ozgesila)\
**Post date:** [March 23, 2021, 7:40pm UTC](https://community.hubspot.com/t/form-character-limit-request-for-prevent-sql-injection-ve-xss/34399/1 "2021-03-23T19:40:40Z")

</div>

Forms should have character limits in order to prevent SQL injection ve XSS. I talked with 3 different Hubspot support agent, they all suggest me an add Javascript code. Client-side solutions, like JS, cannot solve this problem since they can be easily evaded by only using the browser. So, HubSpot should provide a server-side solution that only you can provide.

---

<div class="post-metadata">

**Author:** ![STaruc](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/staruc/32/79091_2.png) [@STaruc](https://community.hubspot.com/u/STaruc)\
**Post date:** [October 10, 2023, 6:21pm UTC](https://community.hubspot.com/t/form-character-limit-request-for-prevent-sql-injection-ve-xss/34399/2 "2023-10-10T18:21:55Z")

</div>

Thanks for this idea. The vulnerability is that Hubspot forms allow for HTML tags to be submitted and rendered within form fields. **Sanitizing fields server-side would be an appropriate solution.** It’s surprising that Hubspot allows this problem; the Hubspot blog even has a [security article mentioning this vulnerability](https://blog.hubspot.com/website/cross-site-scripting), and one security company even documented how Hubspot addressed this same problem in the Hubspot CMS system blog commenting system: [HubSpot Vulnerability Fixed - Cross-Site Scripting (XSS) In The Cloud](https://www.contrastsecurity.com/security-influencers/hubspot-vulnerability-fixed-cross-site-scripting-xss-in-the-cloud)
