Skip to main content

Brave CMS CVE-2026-41576

| EUVDEUVD-2026-28652 HIGH
Cross-site Scripting (XSS) (CWE-79)
2026-05-08 security-advisories@github.com
7.1
CVSS 3.1 · GitHub Advisory
Share

Severity by source

GitHub Advisory PRIMARY
7.1 HIGH
AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N

Primary rating from GitHub Advisory · only source for this CVE.

CVSS VectorGitHub Advisory

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
Low
Availability
None

Lifecycle Timeline

4
Patch available
May 08, 2026 - 16:18 EUVD
Source Code Evidence Fetched
May 08, 2026 - 16:16 vuln.today
Analysis Generated
May 08, 2026 - 16:16 vuln.today
CVE Published
May 08, 2026 - 15:16 nvd
HIGH 7.1

DescriptionGitHub Advisory

Brave CMS is an open-source CMS. Prior to commit 6c56603, the contact form is publicly accessible (no authentication required). User-supplied message text is passed through PHP's nl2br() function, which converts newlines to <br> tags but does not escape HTML. The resulting string is then passed to a Blade email template using the unescaped {!! $msg !!} directive. The resulting content is then rendered in a Blade email template using the unescaped {!! $msg !!} directive. Because HTML is not sanitized, arbitrary markup can be injected into the email body. While modern HTML-capable email clients (Gmail or Outlook Web) typically block JavaScript execution, they still render HTML content. This allows attackers to craft convincing phishing interfaces inside the email sent to the administrator. This issue has been patched via commit 6c56603.

AnalysisAI

HTML injection in Brave CMS 2.0 contact form allows remote attackers to inject arbitrary HTML markup into administrative notification emails. The unauthenticated contact form passes user-supplied message text through nl2br() without HTML escaping, then renders it using Blade's unescaped {!! $msg !!} directive. While JavaScript execution is blocked by modern email clients, attackers can craft convincing phishing interfaces within the email body to target administrators. Upstream fix available via commit 6c56603, which implements HTML escaping using Laravel's e() helper function. EPSS and KEV data not provided. GitHub source diff confirms the vulnerability in ContactController.php and documents the server-side sanitization fix.

Technical ContextAI

This is a server-side stored XSS vulnerability (CWE-79) in a Laravel-based PHP application. The flaw exists in ContactController.php where nl2br() converts newlines to <br> tags but does not perform HTML entity encoding. The resulting string is passed to a Blade email template using the unescaped output directive {!! !!} rather than the escaped {{ }} directive. Laravel's Blade templating engine executes {!! !!} without HTML entity encoding, allowing raw markup injection. The commit diff shows the fix implements Laravel's e() helper (equivalent to htmlspecialchars) to escape HTML entities before passing data to the email template. A broader HtmlSanitizer class was also introduced to clean rich content in Articles and Pages using DOMDocument with allowlists for safe tags and attributes.

RemediationAI

Apply the vendor-released patch by updating to Brave CMS commit 6c56603 or later from the GitHub repository at https://github.com/Ajax30/BraveCMS-2.0. The fix implements HTML entity escaping via Laravel's e() helper function before passing user input to email templates, changing {!! $msg !!} to use the escaped variable $cleanMessage. Review the complete patch at commit 6c5660373cf5f0ca9181603280427aca46ef11ea for implementation details. If immediate patching is not possible, implement compensating controls: (1) Disable the public contact form feature by removing or restricting access to the /contact route until patching is complete (trade-off: eliminates legitimate contact channel); (2) Configure email client policies to render all emails as plain text only (trade-off: degrades legitimate HTML email rendering); (3) Implement Content Security Policy headers in email templates if supported by your email infrastructure to restrict inline styling (limited effectiveness, not universally supported). Note that manual code changes without full patch review may miss additional sanitization improvements in ArticleController and PageController documented in the same commit.

Share

CVE-2026-41576 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy