miniBB 3.7.2 `movedMsgs` SQL Injection Vulnerability
Full Disclosuremailing list archivesFrom: Khashayar Fereidani <info () fereidani 2026-12-1 21:2:31 Author: seclists.org(查看原文) 阅读量:9 收藏

fulldisclosure logo

Full Disclosure mailing list archives


From: Khashayar Fereidani <info () fereidani com>
Date: Fri, 20 Nov 2026 13:23:40 +0000

# 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/)
_______________________________________________
Sent through the Full Disclosure mailing list
https://nmap.org/mailman/listinfo/fulldisclosure
Web Archives & RSS: https://seclists.org/fulldisclosure/


Current thread:

  • miniBB 3.7.2 `movedMsgs` SQL Injection Vulnerability Khashayar Fereidani (Dec 01)

文章来源: https://seclists.org/fulldisclosure/2026/Dec/10
如有侵权请联系:admin#unsafe.sh