{"id":"CVE-2026-142642","aliases":["GHSA-hv67-wfqj-w9xv"],"url":"https://o3.security/vulnerability/CVE-2026-142642","summary":"Laravel: XSS via unescaped Stringable values in Blade component attribute bag","details":"### Impact\n\nBlade 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.\n\n### Patches\n\nThe fix escapes all attribute values except `null`, booleans and `Htmlable` instances, and also escapes values wrapped with `prepends()`. It was merged to the 12.x branch in https://github.com/laravel/framework/pull/62503.\n\n### Workarounds\n\nCast user-controlled values to plain strings, for example `request()->string('title')->toString()`, before passing them to `merge()` or `prepends()`.","published":"2026-12-02T22:49:24.109Z","modified":"2026-12-03T21:02:30.803662999Z","cvss":{"score":5.4,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N"},"epss":null,"cisaKev":null,"exploitsKnown":null,"affectedPackages":[{"ecosystem":"Packagist","name":"laravel/framework","fixedVersion":"13.43.0"},{"ecosystem":"Packagist","name":"laravel/framework","fixedVersion":"12.73.0"}],"fix":{"url":"https://github.com/laravel/framework/commit/d214178be8144c729f3318b194d474d0ed042db7","label":"laravel/framework@d214178"},"references":[{"type":"WEB","url":"https://github.com/laravel/framework/releases/tag/v12.73.0"},{"type":"WEB","url":"https://github.com/laravel/framework/releases/tag/v13.43.0"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/142xxx/CVE-2026-142642.json"},{"type":"ADVISORY","url":"https://github.com/laravel/framework/security/advisories/GHSA-hv67-wfqj-w9xv"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-142642"},{"type":"FIX","url":"https://github.com/laravel/framework/commit/d214178be8144c729f3318b194d474d0ed042db7"},{"type":"FIX","url":"https://github.com/laravel/framework/pull/62503"},{"type":"PACKAGE","url":"https://github.com/laravel/framework"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-12-03T21:02:30.803662999Z"}}