logo

CVE-2021-43808 laravel/framework

Package

Manager: composer
Name: laravel/framework
Vulnerable Version: >=0 <6.20.42 || >=7.0.0 <7.30.6 || >=8.0.0 <8.75.0

Severity

Level: Medium

CVSS v3.1: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N

EPSS: 0.00359 pctl0.57395

Details

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: ```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.

Metadata

Created: 2021-12-08T19:57:36Z
Modified: 2022-08-11T19:19:57Z
Source: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/12/GHSA-66hf-2p6w-jqfw/GHSA-66hf-2p6w-jqfw.json
CWE IDs: ["CWE-327", "CWE-79"]
Alternative ID: GHSA-66hf-2p6w-jqfw
Finding: F425
Auto approve: 1