Lucene search
+L

miniBB 3.7.2 poster_ip Cross Site Scripting

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

Stored XSS in miniBB via poster_ip and forced_ip allows administrative takeover.

Code
# miniBB 3.7.2 `poster_ip` Stored Cross-Site Scripting Vulnerability

**Author:** Khashayar Fereidani
**Disclosure Date:** 2026-11-20
**Advisory:** https://fereidani.com/minibb-372-posterip-stored-cross-site-scripting-vulnerability
**Contact:** https://fereidani.com/contact

## Description

A stored cross-site scripting vulnerability exists in miniBB, caused
by the same `getIP()` validation weakness described in the
`X-Forwarded-For` SQL Injection report: an `X-Forwarded-For` value
containing an IPv6 substring such as `::` is accepted verbatim as the
visitor's IP (limited to 45 characters). This forged "IP address" is
stored in the database without sanitization in two places:

- `posts.poster_ip`, written when any message is posted
(`bb_func_pthread.php` line 100, `bb_func_ptopic.php`)
- `failedlogin.forced_ip`, written on a failed login attempt
(`bb_functions.php` line 881, `fixWrongLogin()`)

Both values are later rendered without HTML encoding in pages that
only administrators and moderators can view:

- `bb_func_vthread.php` line 271 renders `poster_ip` inside the IP
link shown next to each post
- `bb_func_fla_admin.php` lines 62 and 71 render `forced_ip` in the
failed-logins list

**Proof of Concept:**

```bash
curl -H 'X-Forwarded-For: "><img src=x onerror=alert(1)>::' -H
"Referer: http://HOSTNAME/" \
  --data "action=pthread&forum=1&topic=1&postText=hello+world+test" \
  http://HOSTNAME/index.php
```

When an administrator or moderator later opens the affected thread
(or, for the `forced_ip` variant, one failed login followed by opening
the failed-login list), the injected `onerror` handler executes in
their browser session. No action by the victim is required beyond
viewing the page.

## Impact

An unauthenticated attacker can plant a persistent JavaScript payload
that executes in the session of an administrator or moderator,
enabling session hijacking, CSRF protection bypass, and full
administrative takeover of the forum.

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, fix the `getIP()` validation (see the
`X-Forwarded-For` SQL Injection report) so that only genuine IP
addresses can be accepted, and HTML-encode the stored IP values at
output time.

## 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 (same
root cause as the `X-Forwarded-For` SQL injection; `getIP()` now
validates addresses with `inet_pton()`). Fix verified.
- 2026-11-20: Fixed in miniBB 3.8. Report published.

## References

- [miniBB 3.7.2 `X-Forwarded-For` SQL
Injection](https://fereidani.com/minibb-372-x-forwarded-for-sql-injection-vulnerability)
- [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