GHSA-297g-xg4h-7w4c: Laravel Cross-site Scripting vulnerability in blade templating
4.7
CVSS Score
3.1
Basic Information
CVE ID
-
GHSA ID
EPSS Score
-
CWE
Published
5/15/2024
Updated
5/15/2024
KEV Status
No
Technology
PHP
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:L/A:N
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| illuminate/view | composer | >= 7.0.0, < 7.1.2 | 7.1.2 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from how Blade component attributes were processed. In vulnerable versions (<7.1.2), the ComponentTagCompiler's attributesToString method did not automatically escape string values bound to component attributes. This allowed XSS when user-controlled data was passed to Blade components without manual escaping. The fix in 7.1.2 introduced proper escaping through the $escapeBound parameter, confirming that the lack of automatic escaping in this specific method was the root cause. The pull request (laravel/framework#31945) directly modifies this method's behavior to address the XSS vulnerability.