Skip to content
Low 2.6

HTML attribute injection in Markdown mail when Markdown::withSecuredEncoding() is enabled

GHSA-58jq-583v-r2jw First seen on SecPulse

Summary

Summary

When Markdown::withSecuredEncoding() is enabled, values echoed with {{ }} in Markdown mail templates are not escaped for double quotes, single quotes or ampersands. A value rendered inside an HTML attribute can break out of it and inject additional attributes into the email. Applicati...

Affected packages

PackageAffected → Fixed
composerlaravel/framework
>= 13.0.0, <13.44.1→ >=13.44.1
composerlaravel/framework
>= 12.14.1, <12.74.0→ >=12.74.0
Original description The description as published by the source.

Summary

When Markdown::withSecuredEncoding() is enabled, values echoed with {{ }} in Markdown mail templates are not escaped for double quotes, single quotes or ampersands. A value rendered inside an HTML attribute can break out of it and inject additional attributes into the email. Applications that do not enable withSecuredEncoding() are not affected.

Impact

Applications that enable Markdown::withSecuredEncoding() and render user-controlled data inside an HTML attribute in a Markdown mail template, including via the mail::button URL, allow attribute injection into the generated email. This can alter link targets or styling for phishing, and leads to XSS where the mailable is rendered in a context that executes script.

Fixed in https://github.com/laravel/framework/pull/62597

Source: GitHub Repository Security Advisories (Game のスタック) GitHub Advisory OSV

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details