CVE-2021-43808
mediumpriority · track · 24OT risk · elevatedEPSS 0.008 · 57 %ileEUUSEPSS · scored 2026-10-27
Laravel is a web application framework. Laravel prior to versions 8.75.0, 7.30.6, and 6.20.42 contain a possible cross-site scripting (XSS) vulnerability in the Blade templating engine. A broken HTML element may be clicked and the user 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 in versions 8.75.0, 7.30.6, and 6.20.42 by determining the parent placeholder at runtime and using a random hash that is unique to each request.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (12)
Products and version ranges known to be affected.
advisories (1)
Vendor and ecosystem advisories describing this.
- GHSA-66hf-2p6w-jqfwLaravel Framework XSS in Blade templating engine2021-12-08ghsa · osvUS
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: ```html @section('content') <input value="{{ $value }}"> @show ``` resources/views/child.blade.php: ```html @extends('parent') @section('content') <input value="{{ $value }}"> @endsection ``` And a route like the following: ```php 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.
also known as (3)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (26)
External citations — patches, advisories, analysis.
- https://github.com/laravel/framework/commit/b8174169b1807f36de1837751599e2828ceddb9bcnnvd
- https://github.com/laravel/framework/pull/39906cnnvd
- https://github.com/laravel/framework/pull/39908cnnvd
- https://github.com/laravel/framework/pull/39909cnnvd
- https://github.com/laravel/framework/releases/tag/v6.20.42cnnvd
- https://github.com/laravel/framework/releases/tag/v7.30.6cnnvd
- https://github.com/laravel/framework/releases/tag/v8.75.0cnnvd
- https://github.com/laravel/framework/security/advisories/GHSA-66hf-2p6w-jqfwcnnvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan