| عنوان | Volans NGFW Next-Generation Firewall nf51 (r5.1) OS Command Injection |
|---|
| الوصف | The home-grown SQLite data-access layer of the Volans NGFW legacy web framework (include/sqlite3.inc) applies ZERO escaping to user input and executes SQL via exec(), which supports multi-statement. Combined with the nobusiness-family login exemption (checkLoginState() exempts nobusiness_* labels by substring), an attacker can UNAUTHENTICATED (zero Cookie, no token, no Referer) SQL-inject multiple nobusiness_* endpoints on the web management port (80/tcp):
- Unauthenticated read (nobusiness_setting_appid_export): UNION returns srv_ip/srv_user/srv_pwd/encrypt_key from bussiness_org — on a provisioned device these hold the live docking-platform address, account, password and encryption key.
- Unauthenticated arbitrary SQL write (nobusiness_unitinfo_submit): "id" lacks is_numeric, so stacked SQL or an always-true condition rewrites table rows.
- Unauthenticated mass delete of venue registrations / AP ledger / cache files.
- Unauthenticated arbitrary-path arbitrary-content write -> root RCE (nobusiness_basic_securityorginfo_show): SQLite ATTACH DATABASE drops a PHP file into the document root; a GET triggers execution:
company_orgcode = x');ATTACH DATABASE '/usr/local/webui/webui/attachements/PWN9.php' AS p;
CREATE TABLE p.t(c text);
INSERT INTO p.t VALUES('<?php echo shell_exec("id");?>');
WAF bypass: checkSecurityAttack() (include/func.inc) reads the POST body via file_get_contents("php://input"), which is ALWAYS EMPTY under multipart — multipart requests bypass the blacklist entirely (CWE-184). The blacklist patterns also all require whitespace, while SQLite accepts /**/ as a separator; ', (, ), comma, ;, = are absent from the blacklist.
Across the family only nobusiness_securityorginfo.mds:83-84 applies str_replace("'","''") to srv_user/srv_pwd; every other field is concatenated raw. The device's lighttpd/php-cgi runs as root (no privilege drop).
Verified against the firmware's own PHP/lighttpd stack started locally: ATTACH-dropped PHP returned RCE_OK_uid=0(root) gid=0(root) groups=0(root). |
|---|
| المصدر | ⚠️ https://github.com/nenghun/IoT/blob/main/Volans%20NGFW%20(nf51)/SQL_RCE/Unauthenticated%20SQL%20Injection%20Leading%20to%20Root%20RCE.md |
|---|
| المستخدم | nenghun (UID 102476) |
|---|
| ارسال | 24/10/2026 08:25 PM (1 شهر منذ) |
|---|
| الاعتدال | 24/11/2026 09:46 AM (1 month later) |
|---|
| الحالة | تمت الموافقة |
|---|
| إدخال VulDB | 442768 [Volans NGFW Next-Generation Firewall r5.1 Web Management Interface include/sqlite3.inc حقن SQL] |
|---|
| النقاط | 20 |
|---|