Laravel Framework XSS in Blade templating engineGHSA-66hf-2p6w-jqfw
MEDIUMFix: laravel/framework#39906GHSA-66hf-2p6w-jqfw is a medium-severity (CVSS 6.1) Cross-site Scripting (XSS) vulnerability in laravel/framework. 1 public exploit reference exists, so weaponization risk is real. A fix is available for laravel/framework — see the affected versions and patch details below.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
GHSA-66hf-2p6w-jqfw by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 385,987 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
laravel/framework🐘laravel/framework🐘laravel/framework🐘illuminate/view🐘illuminate/view🐘illuminate/viewReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.
Description
A security researcher has disclosed a possible XSS vulnerability in the Blade templating engine.
Given the following two Blade templates:
resources/views/parent.blade.php:
@section('content')
<input value="{{ $value }}">
@show
resources/views/child.blade.php:
@extends('parent')
@section('content')
<input value="{{ $value }}">
@endsection
And a route like the following:
Route::get('/example', function() {
$value = '//localhost/###parent-placeholder-040f06fd774092478d450774f5ba30c5da78acc8## onclick=location.assign(this.value);//';
return view('child', ['value' => $value]);
});
The broken HTML element may be clicked and the user is taken to another location in their browser due to XSS. This is due to the user being able to guess the parent placeholder SHA-1 hash by trying common names of sections. If the parent template contains an exploitable HTML structure an XSS vulnerability can be exposed.
This vulnerability has been patched by determining the parent placeholder at runtime and using a random hash that is unique to each request.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | laravel/framework | all versions | 6.20.42composer require laravel/framework:^6.20.42 |
| 🐘Packagist | laravel/framework | ≥ 7.0.0&&< 7.30.6 | 7.30.6composer require laravel/framework:^7.30.6 |
| 🐘Packagist | laravel/framework | ≥ 8.0.0&&< 8.75.0 | 8.75.0composer require laravel/framework:^8.75.0 |
| 🐘Packagist | illuminate/view | all versions | 6.20.42composer require illuminate/view:^6.20.42 |
| 🐘Packagist | illuminate/view | ≥ 7.0.0&&< 7.30.6 | 7.30.6composer require illuminate/view:^7.30.6 |
| 🐘Packagist | illuminate/view | ≥ 8.0.0&&< 8.75.0 | 8.75.0composer require illuminate/view:^8.75.0 |
Affected Products
frameworklaravelResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for laravel/framework, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update laravel/framework to 6.20.42 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-66hf-2p6w-jqfw is resolved across your whole dependency graph.
Workarounds
Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page.
Frequently Asked Questions
Is GHSA-66hf-2p6w-jqfw in your dependencies?
Find it across Packagist, including transitive dependencies.