Bulletin of Electrical Engineering and Informatics
Vol 15, No 5: October 2026

A Python-based web application firewall for SQLi protection in heterogeneous web server environments

Muhammad Nur Yasir Utomo (Politeknik Negeri Ujung Pandang)
Eddy Tungadi (Politeknik Negeri Ujung Pandang)
Muh. Ahyar (Politeknik Negeri Ujung Pandang)



Article Info

Publish Date
01 Oct 2026

Abstract

Structured query language injection (SQLi) remains one of the most critical threats to web applications. Conventional web application firewall (WAF) such as ModSecurity provide protection but face limitations in heterogeneous environments and often require additional configurations on web servers. This issue is problematic because adding new configurations demands considerable effort and may disrupt stable services. To address this challenge, this research proposes PyWAF, a Python-based WAF developed as a reverse proxy that offers flexible protection across heterogeneous web servers against SQLi attacks. PyWAF employs a weighted core rule set (CRS) with a scoring mechanism and gate flags to detect various SQLi patterns. The proposed method was evaluated in compatibility testing and reliability testing across three popular web server environments namely Apache, Nginx, and OpenLiteSpeed. The reliability evaluation utilized 30 SQLi payloads across three different scenarios, namely GET, POST, and API payload. The results of compatibility test show that the proposed method achieved seamless integration with all web servers without requiring additional server configuration. In term of reliability, PyWAF successfully blocked 100% of SQLi attacks, while ModSecurity blocked 88.9%, demonstrating an improvement of 11.1% in SQLi detection capability.

Copyrights © 2026






Journal Info

Abbrev

EEI

Publisher

Subject

Electrical & Electronics Engineering

Description

Bulletin of Electrical Engineering and Informatics (Buletin Teknik Elektro dan Informatika) ISSN: 2089-3191, e-ISSN: 2302-9285 is open to submission from scholars and experts in the wide areas of electrical, electronics, instrumentation, control, telecommunication and computer engineering from the ...