• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Issue Need Help Whitelisting GTM Noscript in Comodo WAF Rule 214540 on Plesk

SquanchIt

New Pleskian
Server operating system version
Ubuntu 22.04.5 LTS
Plesk version and microupdate number
Plesk Obsidian v18.0.68_build1800250311.08
Hello everyone,


I'm experiencing an issue with my website. A Comodo WAF rule (ID 214540) is blocking my homepage by flagging a standard, legitimate Google Tag Manager (GTM) noscript iframe, which is causing a 403 error.

[client [client IP]] ModSecurity: Access denied with code 403 (phase 4). Match of "rx \\ssrc=\\x22https:\\\\/\\\\/www\\\\.googletagmanager\\\\.com\\\\/ns\\\\.html\\\\?id=GTM|\\ssrc=\\x22https:\\\\/\\\\/w\\\\.soundcloud\\\\.com\\\\/player\\\\/\\?url=" against "TX:0" required. [file "/etc/apache2/modsecurity.d/rules/comodo_free/19_Outgoing_FilterInFrame.conf"] [line "14"] [id "214540"] [msg "COMODO WAF: Possibly malicious iframe tag in output||[your-domain.com]|F|3"] [data "Matched Data: <iframe style='display:none found within TX:0: <iframe style='display:none"] [unique_id "[unique id]"]


The offending GTM code on the page is standard and looks like this:


<noscript>
<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XXXXXXX" height="0" width="0" style="display:none;visibility:hidden" aria-hidden="true"></iframe>
</noscript>


I've tried several custom ModSecurity exception rules in the HTTPS Apache directives:

Code:
SecRule RESPONSE_BODY "@contains googletagmanager.com/ns.html?id=GTM" "phase:4,pass,nolog,ctl:ruleRemoveById=214540,id:1000001"

Code:
SecRule RESPONSE_BODY "@rx <iframe\s+[^>]*src=[\"']https:\/\/www\.googletagmanager\.com\/ns\.html\?id=GTM" "phase:4,pass,nolog,ctl:ruleRemoveById=214540,id:1000001,t:none"

Despite adding these rules under HTTPS, the GTM noscript iframe still triggers rule 214540, and I continue to see 403 errors. The error log indicates that the match is on a generic fragment (<iframe style='display:none), suggesting that the offending rule might be triggering before the full GTM URL is captured—or my custom exception isn’t loaded in the proper order.


Has anyone experienced similar issues or have suggestions on how to effectively whitelist the legitimate GTM noscript iframe without disabling the entire rule? I'm particularly interested in ensuring that my custom exception is loaded after the Comodo rules in the HTTPS configuration.


Thank you in advance for your help!
 
I have no clue about ModSec syntax, sorry for being useless there. I just wanted to suggest changing the ruleset to something else. Comodo is very inactive, and they haven't updated their ruleset in a while. It's possible this won't be a problem with a more actively developed ruleset like Atomic.
 
Back
Top