Laravel: Markdown secured encoding bypassed when Blade views are cached
Package Affected versions Patched versions Description Impact Applications that enable Markdown::withSecuredEncoding() to escape user-controlled data in Markdown mail and mail notifications may not ge
Package
laravel/framework (Composer)Affected versions
>= 13.0.0, < 13.43.0 < 12.73.0Patched versions
13.43.0 12.73.0Description
Impact
Applications that enable Markdown::withSecuredEncoding() to escape user-controlled data in Markdown mail and mail notifications may not get that protection when views have been precompiled with php artisan view:cache or php artisan optimize. The cached view, compiled with the default echo format, is reused when mail views are rendered, so the secured encoder never runs. An attacker who controls data included in an email, such as a user name, could inject Markdown links or remote images into the message, for example for phishing or tracking.
Patches
The issue is fixed by giving non-default echo formats their own compiled view file: laravel/framework#61822
Workarounds
No verified workaround is available.
References
- GHSA-5xc4-gpwg-p8wq
- https://nvd.nist.gov/vuln/detail/CVE-2026-142626
- laravel/framework#61822
- laravel/framework@6bff072
- https://github.com/laravel/framework/releases/tag/v12.73.0
- https://github.com/laravel/framework/releases/tag/v13.43.0
Severity
Low CVSS overall score This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS). / 10CVSS v3 base metrics
Attack vector Network Attack complexity High Privileges required Low User interaction None Scope Unchanged Confidentiality None Integrity Low Availability None CVSS v3 base metrics Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability. Attack complexity: More severe for the least complex attacks. Privileges required: More severe if no privileges are required. User interaction: More severe when no user interaction is required. Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope. Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user. Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user. Availability: More severe when the loss of impacted component availability is highest. CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:NEPSS score
Weaknesses
Weakness CWE-116Improper Encoding or Escaping of Output
The product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. As a result, the intended structure of the message is not preserved. Learn more on MITRE.CVE ID
CVE-2026-142626GHSA ID
GHSA-5xc4-gpwg-p8wqSource code
laravel/frameworkCredits
-
sumaiazaman Reporter
Uh oh!
There was an error while loading. Please reload this page.
See something to contribute? Suggest improvements for this vulnerability.