[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[FD] miniBB 3.7.2 `banip[]` SQL Injection Vulnerability
- To: fulldisclosure@xxxxxxxxxxxx
- Subject: [FD] miniBB 3.7.2 `banip[]` SQL Injection Vulnerability
- From: Khashayar Fereidani <info@xxxxxxxxxxxxx>
- Date: Fri, 20 Nov 2026 13:19:58 +0000
# miniBB 3.7.2 `banip[]` SQL Injection Vulnerability
**Author:** Khashayar Fereidani
**Disclosure Date:** 2026-11-20
**Advisory:** https://fereidani.com/minibb-372-banip-sql-injection-vulnerability
**Contact:** https://fereidani.com/contact
## Description
An SQL injection vulnerability exists in the ban removal interface of
miniBB (bb_func_banip.php), available to administrators and
moderators. In the `deleteban2` processing step, the ban records to
remove are taken from the array keys of the `banip` POST parameter
(lines 47 to 56): each key becomes an element of `$delban` and is
concatenated into the `WHERE` clause built by `getClForums()` and
passed to `db_delete()` without integer casting or quoting.
The keys of a crafted POST array are fully attacker-controlled.
Because PHP converts spaces and dots in request field names to
underscores, SQL keywords are separated with MySQL block comments
instead.
**Proof of Concept:**
```bash
curl -b "ADMIN_COOKIES" -H "Referer: http://HOSTNAME/" \
--data 'action=banip&step=deleteban2&banip[1/**/or/**/sleep(5)#]=x' \
http://HOSTNAME/index.php
```
The response is delayed by 5 seconds, confirming injection into
`DELETE ... WHERE ( id=<key> ... )`.
## Impact
An authenticated moderator or administrator request with crafted field
names can execute arbitrary SQL against the forum database.
CVSS 3.1 base score: 5.5 Medium
(`CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:L/A:N`).
## Solution
Fixed in miniBB 3.8. Upgrade to 3.8 or later. To patch an older
install by hand, cast each key to an integer before passing it to
`getClForums()`, for example `$delban[$i]=(int)$key;`.
## Timeline
- 2026-09-25: Reported to the miniBB maintainer, together with the
other miniBB 3.7.2 issues.
- 2026-10-01: The maintainer sent a pre-release with the fix (the
`banip[]` keys are now cast to integers, and zero values are
rejected). Fix verified.
- 2026-11-20: Fixed in miniBB 3.8. Report published.
## References
- [miniBB 3.7.2 `banip` Variable Variables Scope
Pollution](https://fereidani.com/minibb-372-banip-variable-variables-scope-pollution-vulnerability)
- [miniBB 3.7.2 `banreason` Cross-Site
Scripting](https://fereidani.com/minibb-372-banreason-cross-site-scripting-vulnerability)
- [CWE-89: Improper Neutralization of Special Elements used in an SQL
Command ('SQL Injection')](https://cwe.mitre.org/data/definitions/89.html)
- [miniBB - official website](https://www.minibb.com/)
_______________________________________________
Sent through the Full Disclosure mailing list
https://nmap.org/mailman/listinfo/fulldisclosure
Web Archives & RSS: https://seclists.org/fulldisclosure/