Markdown secured encoding bypassed when Blade views are cached
Summary
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 def...
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| composerlaravel/framework |
<13.43.0→ >=13.43.0 |
>=13.43.0 |
| composerlaravel/framework |
<12.73.0→ >=12.73.0 |
>=12.73.0 |
Original description The description as published by the source.
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.
Source: GitHub Repository Security Advisories (Game のスタック) GitHub Advisory OSV
References
- GITHUB_REPO_ADVISORY laravel/framework