Laravel Framework XSS in Blade templating engine
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.
Betroffene Software
Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.
| Plattform | Paket | Anfällige Versionen | Behoben in |
|---|---|---|---|
| Composer-Paket | illuminate/view | < 6.20.42, >= 7.0.0, < 7.30.6, >= 8.0.0, < 8.75.0 | 6.20.42, 7.30.6, 8.75.0 |
| Composer-Paket | laravel/framework | < 6.20.42, >= 7.0.0, < 7.30.6, >= 8.0.0, < 8.75.0 | 6.20.42, 7.30.6, 8.75.0 |
Verweise
- https://github.com/laravel/framework/security/advisories/GHSA-66hf-2p6w-jqfw
- https://nvd.nist.gov/vuln/detail/CVE-2021-43808
- https://github.com/laravel/framework/pull/39906
- https://github.com/laravel/framework/pull/39908
- https://github.com/laravel/framework/pull/39909
- https://github.com/laravel/framework/commit/b8174169b1807f36de1837751599e2828ceddb9b
- https://github.com/FriendsOfPHP/security-advisories/blob/master/illuminate/view/CVE-2021-43808.yaml
- https://github.com/FriendsOfPHP/security-advisories/blob/master/laravel/framework/CVE-2021-43808.yaml
- https://github.com/laravel/framework
- https://github.com/laravel/framework/releases/tag/v6.20.42
- https://github.com/laravel/framework/releases/tag/v7.30.6
- https://github.com/laravel/framework/releases/tag/v8.75.0
- CVSS-Vektor
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N- Schwäche (CWE)
CWE-327, CWE-79- Plattform
- Composer
- Paket
illuminate/view, laravel/framework- Veröffentlicht
- 08.12.2021
- Aktualisiert
- 11.10.2026 10:22
Quellen und Lizenzen
OSV / GitHub Advisory Database - GHSA-66hf-2p6w-jqfw - CC BY 4.0
Schwachstellenhistorie: illuminate/view
Alle veröffentlichten Schwachstellen dieses Pakets (Composer-Paket), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.
- Einträge insgesamt
- 2
- Erste → letzte
- 12.2021 05.2024
- Ohne Fix
- 0
- In Angriffen ausgenutzt
- 0
Verteilung nach Schweregrad
- Mittel 2
Veröffentlichungen pro Jahr
- 2021: 1
- 2022: 0
- 2023: 0
- 2024: 1
- 2025: 0
- 2026: 0
-
Laravel Framework XSS in Blade templating engine dieser Eintrag
Erkennen Sie Schwachstellen in Ihrer Anwendung
Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.