Vulnerability GHSA-5xc4-gpwg-p8wq
Summary
Laravel: Markdown secured encoding bypassed when Blade views are cached
Details
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: https://github.com/laravel/framework/pull/61822
Workarounds
No verified workaround is available.
Related Vulnerabilities
Other vulnerabilities affecting the same packages