This site contains affiliate links — we earn a commission if you sign up through them, at no extra cost to you.

CPGuard WAF: Protecting Websites from SQL Injection, XSS and More

How CPGuard Web Application Firewall blocks web attacks at the server level — more effective than relying on WordPress plugins alone.

CPGuard WAF: Protecting Websites from SQL Injection, XSS and More

What is WAF and How Does CPGuard WAF Work?

A Web Application Firewall inspects and filters every HTTP/HTTPS request before it reaches PHP or the website database. CPGuard WAF operates at the server level — providing protection even when application code has vulnerabilities — using OWASP Top 10-aligned rules, the international standard for critical web application security risks.

Blocking SQL Injection

SQL Injection inserts SQL commands into web inputs to directly extract or modify database content — one of the most common and damaging web attacks. CPGuard WAF detects SQL Injection patterns and blocks requests before they reach the database, protecting even legacy PHP sites that do not sanitise user input.

Blocking Cross-Site Scripting (XSS)

XSS embeds malicious scripts in web pages through unsanitised inputs. When other users load the affected page, the script executes in their browser — enabling session cookie theft, redirects to malicious sites, or phishing overlays. CPGuard WAF detects Reflected, Stored, and DOM-based XSS before scripts are stored or executed.

Blocking RFI and LFI

Remote File Inclusion (RFI) tricks PHP into loading external files; Local File Inclusion (LFI) accesses local system files that should be inaccessible — such as /etc/passwd or application configuration files. CPGuard WAF detects path traversal patterns and external URL parameters, blocking them before PHP processes the request.

Brute Force Protection

Beyond WAF rules, CPGuard includes Brute Force Protection that automatically blocks IP addresses exceeding a configurable failed-login threshold. Coverage extends to WordPress wp-login.php, DirectAdmin, FTP, SSH, and email login — all common brute-force targets.

Automatic Rule Updates

Web threats evolve continuously — rules that are not updated quickly become ineffective against new attacks. CPGuard automatically pulls rule updates from a central database, keeping WAF coverage current without requiring server administrator intervention.

Whitelist and Exception Configuration

WAF rules can occasionally block legitimate requests — for example, a WooCommerce checkout with special characters, or an API endpoint accepting JSON that resembles an attack payload. CPGuard supports whitelist rules for specific URLs or parameters that should bypass WAF inspection, balancing security with application functionality.

Choose Hosting with Server-Level WAF

Server-level WAF differs from WordPress security plugins: it operates before PHP loads, stopping attacks faster and without adding PHP processing overhead. AsiaGB.com provides hosting and VPS with server-level security, SSD storage, DirectAdmin, 24-hour Thai support, and 99% uptime.

RecommendedAsiaGB.com — the hosting & VPS we use and recommend: servers in Thailand and Singapore, SSD storage, managed through DirectAdmin, with 24-hour Thai support and 99% uptime.

Editor's pick from our hands-on testing.

Visit AsiaGB →

Frequently Asked Questions

How does CPGuard WAF differ from WordPress security plugins?
CPGuard WAF operates at the server level before PHP or WordPress loads, stopping attacks faster and without consuming PHP resources. WordPress security plugins run after PHP has loaded, providing narrower protection at higher resource cost.
Will WAF make my website slower?
The performance impact is minimal for normal traffic. CPGuard WAF is designed to inspect requests very quickly — added latency is typically under 1–2 ms in most cases, imperceptible to users.
Can WAF mistakenly block legitimate website requests?
Yes, false positives can occur, particularly on sites with complex forms or APIs that accept JSON resembling attack payloads. These are resolved by adding whitelist rules for the specific URLs or parameters being incorrectly blocked.
Does hosting need CPGuard WAF specifically to be secure?
Not CPGuard specifically — but hosting should include some form of server-level WAF. Providers using Imunify360, ModSecurity with quality rules, or equivalent WAF systems provide comparable protection.