Skip to content
Medium 4.2

Unescaped bound attributes on Blade dynamic components that resolve to class-based components

GHSA-9966-43cq-4mpr First seen on SecPulse

Summary

Impact

Blade's <x-dynamic-component> did not HTML-escape bound attributes (:attr="$value") when the target resolved to a class-based component. If user-controlled data was bound to an attribute that is not a constructor parameter and the component outputs {{ $attributes }}, the value co...

Affected packages

PackageAffected → Fixed
composerlaravel/framework
<13.43.0→ >=13.43.0
composerlaravel/framework
<12.73.0→ >=12.73.0
Original description The description as published by the source.

Impact

Blade's `` did not HTML-escape bound attributes (:attr="$value") when the target resolved to a class-based component. If user-controlled data was bound to an attribute that is not a constructor parameter and the component outputs {{ $attributes }}, the value could break out of the HTML attribute and lead to cross-site scripting (XSS). The same component rendered with its normal tag escaped the value correctly. Anonymous component targets were not affected.

Patches

The fix is merged on the 13.x and 12.x branches: https://github.com/laravel/framework/pull/62455 and https://github.com/laravel/framework/pull/62456. It has not been confirmed as released. Compiled views keep the previous behavior until they are recompiled, so run php artisan view:clear or php artisan view:cache after upgrading.

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