Articles › How to Disable CGI Access in WHM

After checking our server logs we have noticed that multiple attempts have been made to exploit our hosting accounts using Cross-site Scripting (XSS) type of attack using the CGI-BIN.

XSS CGI Hack Attempt using an IPAD.

XSS CGI Hack Attempt using an IPAD.

The attacker attempts to modify the server settings by running multiple commands directly at the CGI-BIN.


Decoding the URL parameters shows us the server variables.

To prevent this type of attack check out the OWASP XSS Prevention Cheat Sheet. To improve your website security you can disable CGI-BIN access if you operate a hosting / reseller account from the Web Host Manager (WHM).

Disable CGI-BIN Access in Web Host Manager / cPanel

  1. Login into your WHM ( Web Host Manager ) and goto Add a Package
  2. Complete the resources fields and in the setting option un-tick CGI Access
  3. Press Add , now goto Upgrade / Downgrade Multiple Accounts
  4. Select all the domains you wish to disable CGI-Access and change the package.

For additional help please visit some of these resources.