Lucene search
+L

miniBB 3.7.2 banreason Cross Site Scripting

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

Reflected XSS in miniBB banreason parameter allows arbitrary JavaScript execution.

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

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
5.3Medium risk
Vulners AI Score5.3
4