Results 1 to 4 of 4

Thread: Access denied with code 406 (phase 2). Pattern match

  1. #1
    Registered User
    Join Date
    Jun 2012
    Posts
    1
    cPanel/WHM Access Level

    Root Administrator

    Default Access denied with code 406 (phase 2). Pattern match

    Hi my company has a hosting server running cpanel whm

    one of my sites which has a shop keeps being blocked when i looked in the mod_security log i get the following
    this is an urgent request for help.

    Access denied with code 406 (phase 2). Pattern match "(?:\\b(?:(?:type\\b\\W*?\\b(?:text\\b\\W*?\\b(?:j(?:ava)?|ecma|vb)|application\\b\\W*?\\bx-(?:java|vb))script|c(?:opyparentfolder|reatetextrange)|get(?:special|parent)folder|iframe\\b.{0,100}?\\bsrc)\\b|on(?:(?:mo(?:use(?:o(?:ver|ut)|down|move|up)|ve)| ..." at REQUEST_FILENAME. [file "/usr/local/apache/conf/modsec2.user.conf"] [line "117"] [id "950004"] [msg "Cross-site Scripting (XSS) Attack"] [data ".cookie"] [severity "CRITICAL"] [tag "WEB_ATTACK/XSS"]

    Any help would be appreciated

  2. #2
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    10,067
    cPanel/WHM Access Level

    Root Administrator

    Default Re: Access denied with code 406 (phase 2). Pattern match

    If modsecurity is blocking a legit script from working properly, this tool might be useful to you:
    ConfigServer ModSecurity Control

    After installing that, in the settings for it you could whitelist for that one domain (or all domains) the rule giving you problems. In this case its: 950004


    HTH!

  3. #3
    Member
    Join Date
    Jun 2011
    Posts
    99
    cPanel/WHM Access Level

    Root Administrator

    Default Re: Access denied with code 406 (phase 2). Pattern match

    This will get triggered on a POST request if the data in the post consists of code like an iframe or script tag. as well as others. So basically your shop application is allowing these kinds of code to put into post requests. I would actually fix the application rather than disabling that rule, but that's your call.

  4. #4
    Member
    Join Date
    Jul 2012
    Posts
    36
    cPanel/WHM Access Level

    Root Administrator

    Default Re: Access denied with code 406 (phase 2). Pattern match

    based on the rule, it looks like you have an application thats generating a filename with this in the filename

    .cookie

    and the rule looks for .cookie in filenames, so you either need to change your application so it doesnt do that, change the rule so it doesnt look for that in the filename or use a different filename

Similar Threads

  1. mode security code 406 error
    By k-planethost in forum Optimization
    Replies: 2
    Last Post: 03-29-2011, 10:25 AM
  2. Replies: 3
    Last Post: 02-05-2011, 11:51 PM
  3. Replies: 1
    Last Post: 05-21-2010, 01:37 PM
  4. exclude pattern match from cpbackup
    By boatdesign in forum cPanel & WHM Discussions
    Replies: 0
    Last Post: 11-19-2007, 11:16 PM
  5. Access denied by access control list
    By trout21 in forum cPanel & WHM Discussions
    Replies: 4
    Last Post: 10-15-2004, 08:36 AM