CVE-2026-142638: Laravel: Unescaped bound attributes on Blade dynamic components that resolve to class-based components
Laravel is a web application framework. Prior to 13.43.0 and 12.73.0, 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 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. Existing compiled views retain the vulnerable behavior until they are cleared or recompiled with php artisan view:clear or php artisan view:cache. 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 - Operational
Clear or recompile existing compiled views with `php artisan view:clear` or `php artisan view:cache`.
Event History
Frequently Asked Questions
Which applications are actually exposed to this issue?
Applications are exposed when they use Blade <x-dynamic-component> to resolve a class-based component, bind user-controlled data to an attribute that is not a constructor parameter, and that component renders {{ $attributes }}. Anonymous component targets are not affected, and rendering the same class-based component through its normal tag escapes the value correctly.
What must an attacker be able to do to exploit it?
An attacker must be able to influence a value bound through a dynamic component attribute and cause that value to be rendered by the target class-based component's attribute bag. Exploitation also requires user interaction, consistent with the provided CVSS vector.
What should be done after updating Laravel?
Update to Laravel 13.43.0 or 12.73.0, as applicable. Then clear or recompile compiled Blade views with php artisan view:clear or php artisan view:cache, because existing compiled views retain the vulnerable behavior until they are cleared or regenerated.