CVE-2026-142642: Laravel: XSS via unescaped Stringable values in Blade component attribute bag

Published Dec 2, 2026
·
Updated

Laravel is a web application framework. Prior to 13.43.0 and 12.73.0, Blade component attribute bags did not HTML-escape non-Htmlable object values, such as Illuminate\Support\Stringable, passed to ComponentAttributeBag::merge() or prepends(). Applications that place user-controlled Stringable values (for example, the result of request()->string()) into component attributes could allow an attacker to break out of the attribute and inject arbitrary attributes, such as event handlers. This results in cross-site scripting that runs in the origin of the application. This issue is fixed in versions 13.43.0 and 12.73.0.

Affected Software

1 affected component
composer/laravel/framework<13.43.0, <12.73.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 13.43.0
  2. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 12.73.0

Event History

Dec 2, 2026
CVE Published
via MITRE·10:49 PM
Data Sourced
via MITRE·10:49 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which applications are exposed to this issue?

Applications using Laravel framework versions earlier than 13.43.0 or 12.73.0 are affected if they pass user-controlled non-Htmlable objects, such as Illuminate\Support\Stringable values, into Blade component attributes through ComponentAttributeBag::merge() or prepends().

2

What does an attacker need to exploit it?

An attacker needs a way to supply data that the application converts or retains as a Stringable value and then places in a Blade component attribute bag. A successful payload can escape the intended attribute and add attributes such as event handlers, leading to cross-site scripting in the application's origin.

3

Are all Blade component attribute bags vulnerable by default?

No. The issue depends on application code placing user-controlled non-Htmlable object values into component attributes via merge() or prepends(). The provided information does not indicate that ordinary static attributes or safely handled values are affected.

4

How can the issue be remediated?

Upgrade Laravel to version 13.43.0 or 12.73.0, depending on the supported release line. If an immediate upgrade is not possible, avoid passing user-controlled Stringable or other non-Htmlable object values into component attribute bags through merge() or prepends().

5

How can teams identify potentially affected code?

Review Blade components and related application code for calls to ComponentAttributeBag::merge() or prepends() that receive values derived from request input. In particular, look for request()->string() results or other user-controlled Illuminate\Support\Stringable values being used as attribute values.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203