Description
MyBB is free and open source forum software. Prior to 1.8.40, the Buddy/Ignore component does not sanitize usernames correctly, allowing attackers to perform JavaScript code injection through a specially crafted username. The User CP Buddy/Ignore list and the Select Buddies list in Private Messages pass usernames through htmlspecialchars_uni(), which may leave single quotes unescaped. The payload is triggered when a victim chooses Yes in Please Confirm while removing the username in usercp.php, or selects the username through the onclick handler in the xmlhttp.php Select Buddies popup. The uniquely identifying implementation details include Private Messages Select Buddies list, and unescaped single quotes. This issue is fixed in version 1.8.40.
Published: 2026-08-18
Score: 8.7 High
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

MyBB forum software allows the Buddy/Ignore component to render usernames without proper escaping, enabling attackers to inject JavaScript code into the page. The injection can be triggered when a victim confirms removal of a nickname in usercp.php or selects a nickname via the onclick handler in the Select Buddies popup. Successful exploitation results in client‑side code execution in the victim’s browser, which can lead to theft of session cookies, access token hijacking, or defacement of the site. The weakness is a Cross‑Site Scripting flaw (CWE‑79).

Affected Systems

MyBB Forum software, versions prior to 1.8.40. The vulnerability exists in the Buddy/Ignore module and the Private Messages Select Buddies list where usernames are displayed. Upgrading to version 1.8.40 or later resolves the issue.

Risk and Exploitability

The CVSS score of 8.7 classifies the flaw as high severity, and the EPSS score is not available, indicating no current quantitative analysis of exploitation probability. It is not listed in the CISA KEV catalog. Exploitation requires the attacker to create or own a username containing malicious code and for a victim to view that username in a context that triggers the unsanitized output. Once a victim’s browser processes the injected script, the attacker can hijack the user session or execute arbitrary client‑side actions. The attack vector is a web application attack via the user interface. The need for a vulnerable username means social engineering or targeted phishing may be necessary to attract victims to the affected page.

Generated by OpenCVE AI on August 18, 2026 at 17:55 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Deploy the official MyBB 1.8.40 release or later to eliminate the unsanitized username rendering.
  • Remove or sanitize any existing usernames that contain unescaped single quotes or other potential scripting content from the database.
  • Ensure that all code paths rendering usernames perform output encoding, such as using htmlspecialchars_uni() or a reliable HTML escaping function, to guard against future XSS vectors.

Generated by OpenCVE AI on August 18, 2026 at 17:55 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 18 Aug 2026 18:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Tue, 18 Aug 2026 17:45:00 +0000

Type Values Removed Values Added
First Time appeared Mybb
Mybb mybb
Vendors & Products Mybb
Mybb mybb

Tue, 18 Aug 2026 16:00:00 +0000

Type Values Removed Values Added
Description MyBB is free and open source forum software. Prior to 1.8.40, the Buddy/Ignore component does not sanitize usernames correctly, allowing attackers to perform JavaScript code injection through a specially crafted username. The User CP Buddy/Ignore list and the Select Buddies list in Private Messages pass usernames through htmlspecialchars_uni(), which may leave single quotes unescaped. The payload is triggered when a victim chooses Yes in Please Confirm while removing the username in usercp.php, or selects the username through the onclick handler in the xmlhttp.php Select Buddies popup. The uniquely identifying implementation details include Private Messages Select Buddies list, and unescaped single quotes. This issue is fixed in version 1.8.40.
Title MyBB: Buddy/ignore list username XSS
Weaknesses CWE-79
References
Metrics cvssV3_1

{'score': 8.7, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-18T17:55:22.351Z

Reserved: 2026-05-08T20:08:17.207Z

Link: CVE-2026-45115

cve-icon Vulnrichment

Updated: 2026-08-18T17:55:18.854Z

cve-icon NVD

Status : Received

Published: 2026-08-18T16:17:06.180

Modified: 2026-08-18T18:17:34.010

Link: CVE-2026-45115

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-18T18:00:04Z

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')