Lucene search
+L

miniBB 3.7.2 banip SQL Injection

🗓️ 02 Dec 2026 00:00:00Reported by Khashayar FereidaniType 
packetstorm
 packetstorm
🔗 packetstorm.news👁 3 Views

SQL Injection in miniBB ban removal interface allows arbitrary SQL execution.

Code
# 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/)

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

02 Dec 2026 00:00Current
6.1Medium risk
Vulners AI Score6.1
3