CVE-2026-45118: MyBB: Contact page reflected XSS

Published Aug 18, 2026
·
Updated

MyBB is free and open source forum software. Prior to 1.8.40, the Contact module does not validate a redirect URL or protocol correctly, resulting in an open redirect and reflected JavaScript code injection. contact.php accepts the redirect target from the from HTTP parameter in $mybb->input['from'] or the Referer HTTP header in $SERVER['HTTPREFERER'] and passes it to redirect() without sufficient verification. A javascript: URI becomes the target of the Click here if you don't want to wait any longer link because $forceredirect is true, allowing script execution when a victim selects the link. This issue is fixed in version 1.8.40.

Affected Software

1 affected component
MyBB MyBB<1.8.40

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade MyBB to a version that resolves this vulnerability.

    Fixed in 1.8.40
  2. Compensating control

    If you cannot upgrade immediately, restrict/limit the ability for users to supply arbitrary redirect targets by blocking or filtering requests with a malicious/unsafe HTTP Referer or a crafted HTTP parameter named "from" to contact.php, and enforce redirect target allowlisting at the edge (e.g., WAF/Reverse proxy) for the MyBB Contact module.

Event History

Aug 18, 2026
CVE Published
via MITRE·03:55 PM
Data Sourced
via MITRE·03:55 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which deployments are exposed and what user interaction is required?

MyBB installations running versions earlier than 1.8.40 are affected when the Contact module is available. The issue is exploitable remotely without attacker authentication, but the victim must select the redirect page's "Click here if you don't want to wait any longer" link.

2

What input does an attacker control to trigger the injection?

An attacker can supply a javascript: URI through the from HTTP parameter or the Referer HTTP header. Because the Contact module passes this value to redirect() without sufficient validation, the URI is placed in the manual redirect link and can execute JavaScript when selected.

3

What version fixes the issue?

Upgrade MyBB to version 1.8.40, which fixes the redirect URL and protocol validation flaw in the Contact module.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203