Lucene search
+L

miniBB 3.7.2 movedMsgs SQL Injection

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

SQL Injection in miniBB message moving interface allows moderators to execute arbitrary SQL.

Code
# miniBB 3.7.2 `movedMsgs` SQL Injection Vulnerability

**Author:** Khashayar Fereidani
**Disclosure Date:** 2026-11-20
**Advisory:** https://fereidani.com/minibb-372-movedmsgs-sql-injection-vulnerability
**Contact:** https://fereidani.com/contact

## Description

An SQL injection vulnerability exists in the message moving interface
of miniBB (bb_func_movepost.php), available to administrators and
moderators. The `movedMsgs` POST parameter is split with `explode()`
at line 26 and its elements are used in SQL statements without integer
casting, reaching `db_simpleSelect()` (lines 31, 37, 54, 60, 173),
`updateArray()` (line 137) and the `$xtr` condition built by
`getClForums()`. The same applies to the values of the `deleteAll`
checkbox array (line 272) used to build `$xtr` for the query at lines
282 and 289. The parallel deletion code in bb_func_delmsg.php line 33
applies `$post+=0` to the same kind of data.

**Proof of Concept:**

```bash
curl -b "MODERATOR_COOKIES" -H "Referer: http://HOSTNAME/" \
  --data "action=movepost&step=2&topicid=1&forum_id=1&topictitle=x&movedMsgs=1'+or+sleep(5)--"
\
  http://HOSTNAME/index.php
```

The response is delayed by 5 seconds, confirming injection into `WHERE
post_id='...'`.

## Impact

An authenticated moderator can execute arbitrary SQL against the forum
database, including extraction of member records and password hashes.

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 element to an integer before use, for
example `array_map('intval', explode(',', $_POST['movedMsgs']))`, and
cast each `$_POST['deleteAll']` element as bb_func_delmsg.php already
does.

## 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 (post IDs
in `movedMsgs` and `deleteAll` are now cast to integers, and zero IDs
are rejected). Fix verified.
- 2026-11-20: Fixed in miniBB 3.8. Report published.

## References

- [miniBB 3.7.2 `deleteAll` Cross-Site
Scripting](https://fereidani.com/minibb-372-deleteall-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