CVE-2026-142626: Laravel: Markdown secured encoding bypassed when Blade views are cached
Laravel is a web application framework. Prior to 13.43.0 and 12.73.0, 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. This issue is fixed in versions 13.43.0 and 12.73.0.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 13.43.0 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 12.73.0
Event History
Frequently Asked Questions
Which applications are affected by this issue?
Affected applications use Markdown::withSecuredEncoding() for Markdown mail or mail notifications and have precompiled views using php artisan view:cache or php artisan optimize. The issue applies to Laravel versions earlier than 13.43.0 and 12.73.0.
What does an attacker need to exploit it?
An attacker needs control over data that the application includes in a Markdown email, such as a user name. They can use that data to inject Markdown links or remote images into the rendered message.
Are applications that do not cache Blade views affected?
The described bypass depends on reuse of a cached view compiled with the default echo format. Applications that have not precompiled views with php artisan view:cache or php artisan optimize are not described as affected by this condition.
What should be done if an immediate upgrade is not possible?
Avoid precompiling the relevant views with php artisan view:cache or php artisan optimize, and prevent user-controlled values from being included in Markdown mail content until the application can be updated. The fixed versions are Laravel 13.43.0 and 12.73.0.