From: Khashayar Fereidani <info () fereidani com>
Date: Fri, 20 Nov 2026 13:24:21 +0000
# miniBB 3.7.2 `banreason` Cross-Site Scripting Vulnerability
**Author:** Khashayar Fereidani
**Disclosure Date:** 2026-11-20
**CVE:** CVE-2026-52222
**Advisory:** https://fereidani.com/minibb-372-banreason-cross-site-scripting-vulnerability
**Contact:** https://fereidani.com/contact
## Description
A reflected Cross-Site Scripting (XSS) vulnerability exists in miniBB
due to insufficient sanitization of user-supplied input in the
`banreason` parameter of the IP banning interface (bb_func_banip.php).
The value is read from `$_GET['banreason']` without encoding and
printed inside the `value="..."` attribute of the ban form:
```php
$banreason=(isset($_GET['banreason'])?$_GET['banreason']:'');
```
An attacker can craft a malicious URL that, when visited by an
authenticated admin/moderator user, executes arbitrary JavaScript in
the context of the victim's browser session.
**Proof of Concept:**
```text
http://HOSTNAME/index.php?action=banip&banreason="%20autofocus%20onfocus="alert(1)
```
## Impact
A successful exploitation of this vulnerability allows an attacker to
execute arbitrary JavaScript in the victim's browser. This could lead
to session hijacking, credential theft, defacement of the web
interface, or further attacks against authenticated users.
CVSS 3.1 base score: 6.1 Medium
(`CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`).
## Solution
Fixed in miniBB 3.8. Upgrade to 3.8 or later. To patch an older
install by hand, pass the value through `operate_string()`:
```php
$banreason=(isset($_GET['banreason'])?operate_string($_GET['banreason']):'');
```
## Timeline
- 2026-05-12: Reported to the miniBB maintainer. CVE ID requested.
- 2026-05-14: The maintainer confirmed the issue and proposed a fix:
pass `$_GET['banreason']` through `operate_string()`.
- 2026-09-25: CVE-2026-52222 shared with the maintainer. Proposed fix
tested and confirmed.
- 2026-11-20: Fixed in miniBB 3.8. Report published.
## References
- [CVE-2026-52222 - NVD](https://nvd.nist.gov/vuln/detail/CVE-2026-52222)
- [CWE-79: Improper Neutralization of Input During Web Page Generation
('Cross-site Scripting')](https://cwe.mitre.org/data/definitions/79.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 `banreason` Cross-Site Scripting Vulnerability Khashayar Fereidani (Dec 01)