Description (en)
# 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/)
_______________________________________________
Sent through the Full Disclosure mailing list
https://nmap.org/mailman/listinfo/fulldisclosure
Web Archives & RSS: https://seclists.org/fulldisclosure/Raw JSON
{
"containers": {
"cna": {
"affected": [
{
"product": "Minibb",
"vendor": "Minibb",
"versions": [
{
"status": "affected",
"version": "unknown"
}
]
}
],
"credits": [
{
"lang": "en",
"type": "finder",
"value": "Khashayar Fereidani"
}
],
"descriptions": [
{
"lang": "en",
"value": "# miniBB 3.7.2 `poster_ip` Stored Cross-Site Scripting Vulnerability\n\n**Author:** Khashayar Fereidani\n**Disclosure Date:** 2026-11-20\n**Advisory:** https://fereidani.com/minibb-372-posterip-stored-cross-site-scripting-vulnerability\n**Contact:** https://fereidani.com/contact\n\n## Description\n\nA stored cross-site scripting vulnerability exists in miniBB, caused\nby the same `getIP()` validation weakness described in the\n`X-Forwarded-For` SQL Injection report: an `X-Forwarded-For` value\ncontaining an IPv6 substring such as `::` is accepted verbatim as the\nvisitor's IP (limited to 45 characters). This forged \"IP address\" is\nstored in the database without sanitization in two places:\n\n- `posts.poster_ip`, written when any message is posted\n(`bb_func_pthread.php` line 100, `bb_func_ptopic.php`)\n- `failedlogin.forced_ip`, written on a failed login attempt\n(`bb_functions.php` line 881, `fixWrongLogin()`)\n\nBoth values are later rendered without HTML encoding in pages that\nonly administrators and moderators can view:\n\n- `bb_func_vthread.php` line 271 renders `poster_ip` inside the IP\nlink shown next to each post\n- `bb_func_fla_admin.php` lines 62 and 71 render `forced_ip` in the\nfailed-logins list\n\n**Proof of Concept:**\n\n```bash\ncurl -H 'X-Forwarded-For: \"><img src=x onerror=alert(1)>::' -H\n\"Referer: http://HOSTNAME/\"; \\\n --data \"action=pthread&forum=1&topic=1&postText=hello+world+test\" \\\n http://HOSTNAME/index.php\n```\n\nWhen an administrator or moderator later opens the affected thread\n(or, for the `forced_ip` variant, one failed login followed by opening\nthe failed-login list), the injected `onerror` handler executes in\ntheir browser session. No action by the victim is required beyond\nviewing the page.\n\n## Impact\n\nAn unauthenticated attacker can plant a persistent JavaScript payload\nthat executes in the session of an administrator or moderator,\nenabling session hijacking, CSRF protection bypass, and full\nadministrative takeover of the forum.\n\nCVSS 3.1 base score: 6.1 Medium\n(`CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`).\n\n## Solution\n\nFixed in miniBB 3.8. Upgrade to 3.8 or later. To patch an older\ninstall by hand, fix the `getIP()` validation (see the\n`X-Forwarded-For` SQL Injection report) so that only genuine IP\naddresses can be accepted, and HTML-encode the stored IP values at\noutput time.\n\n## Timeline\n\n- 2026-09-25: Reported to the miniBB maintainer, together with the\nother miniBB 3.7.2 issues.\n- 2026-10-01: The maintainer sent a pre-release with the fix (same\nroot cause as the `X-Forwarded-For` SQL injection; `getIP()` now\nvalidates addresses with `inet_pton()`). Fix verified.\n- 2026-11-20: Fixed in miniBB 3.8. Report published.\n\n## References\n\n- [miniBB 3.7.2 `X-Forwarded-For` SQL\nInjection](https://fereidani.com/minibb-372-x-forwarded-for-sql-injection-vulnerability)\n- [CWE-79: Improper Neutralization of Input During Web Page Generation\n('Cross-site Scripting')](https://cwe.mitre.org/data/definitions/79.html)\n- [miniBB - official website](https://www.minibb.com/)\n_______________________________________________\nSent through the Full Disclosure mailing list\nhttps://nmap.org/mailman/listinfo/fulldisclosure\nWeb Archives & RSS: https://seclists.org/fulldisclosure/"
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-79",
"description": "CWE-79",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-12-01T21:29:08Z",
"orgId": "4e2abfbf-4a2a-4b76-a4e0-d77c18ba156c",
"shortName": "VULNARCHIVE"
},
"references": [
{
"tags": [
"technical-description",
"exploit"
],
"url": "https://vuln.freearchive.org/archive/full-disclosure/2026/Dec/4"
},
{
"tags": [
"technical-description"
],
"url": "https://seclists.org/fulldisclosure/2026/Dec/4"
},
{
"url": "http://HOSTNAME/\""
},
{
"url": "http://HOSTNAME/index.php"
},
{
"url": "https://cwe.mitre.org/data/definitions/79.html"
},
{
"url": "https://fereidani.com/contact"
},
{
"url": "https://fereidani.com/minibb-372-posterip-stored-cross-site-scripting-vulnerability"
},
{
"url": "https://fereidani.com/minibb-372-x-forwarded-for-sql-injection-vulnerability"
},
{
"url": "https://nmap.org/mailman/listinfo/fulldisclosure"
},
{
"url": "https://seclists.org/fulldisclosure/"
},
{
"url": "https://www.minibb.com/"
}
],
"source": {
"defect": [
"https://seclists.org/fulldisclosure/2026/Dec/4"
],
"discovery": "EXTERNAL"
},
"title": "miniBB 3.7.2 `poster_ip` Stored Cross-Site Scripting Vulnerability",
"x_gcve": [
{
"recordType": "advisory",
"relationships": [],
"vulnId": "GCVE-1988-2026-0580",
"x_vulnarchive": {
"archiveUrl": "https://vuln.freearchive.org/archive/full-disclosure/2026/Dec/4",
"automated": true,
"contentSha256": "b1f688f9cbb26d67e97bc83bebb387ae973700275cafb8225913355d8c60b4aa",
"evidenceScore": 11,
"messageId": "",
"originalUrl": "https://seclists.org/fulldisclosure/2026/Dec/4",
"policy": "vulnarchive-1",
"sourceFormat": "text/html",
"sourcePublishedAt": "2026-11-20T13:19:28Z"
}
}
]
}
},
"cveMetadata": {
"assignerOrgId": "4e2abfbf-4a2a-4b76-a4e0-d77c18ba156c",
"assignerShortName": "VULNARCHIVE",
"datePublished": "2026-12-01T21:29:08Z",
"dateUpdated": "2026-12-01T21:29:08Z",
"state": "PUBLISHED",
"vulnId": "GCVE-1988-2026-0580"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}