{"id":"CVE-2021-43808","aliases":["CVE-2021-43808","GHSA-66hf-2p6w-jqfw"],"related":[],"kind":"vulnerability","state":"published","title":"Blade `@parent` Exploitation Leading To Possible XSS in Laravel","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"A security researcher has disclosed a possible XSS vulnerability in the Blade templating engine.\n\nGiven the following two Blade templates:\n\nresources/views/parent.blade.php:\n\n```html\n@section('content')\n<input value=\"{{ $value }}\">\n@show\n```\n\nresources/views/child.blade.php:\n\n```html\n@extends('parent')\n\n@section('content')\n<input value=\"{{ $value }}\">\n@endsection\n```\n\nAnd a route like the following:\n\n```php\nRoute::get('/example', function() {\n    $value = '//localhost/###parent-placeholder-040f06fd774092478d450774f5ba30c5da78acc8## onclick=location.assign(this.value);//';\n\n    return view('child', ['value' => $value]);\n});\n```\n\nThe 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.\n\nThis vulnerability has been patched by determining the parent placeholder at runtime and using a random hash that is unique to each request.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Laravel es un framework de aplicaciones web. Laravel versiones anteriores a 8.75.0, 7.30.6 y 6.20.42, contiene una posible vulnerabilidad de tipo cross-site scripting (XSS) en el motor de plantillas Blade. Puede hacerse clic en un elemento HTML roto y llevar al usuario a otra ubicación en su navegador debido a un ataque de tipo XSS. Esto es debido a que el usuario puede adivinar el hash SHA-1 del marcador de posición padre al probar los nombres comunes de las secciones. Si la plantilla padre contiene una estructura HTML explotable puede exponerse una vulnerabilidad de tipo XSS. Esta vulnerabilidad ha sido parcheada en las versiones 8.75.0, 7.30.6 y 6.20.42 determinando el marcador de posición padre en tiempo de ejecución y usando un hash aleatorio que es único para cada petición","source":"nvd"}],"published":"2021-12-07T22:20:12.000Z","modified":"2026-07-08T06:27:53.544Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N","score":5.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:M/Au:N/C:N/I:P/A:N","score":4.3,"rating":"MEDIUM"}],"cwes":["CWE-79","CWE-327"],"affected":[{"ranges":[{"version":">= 8.0.0, < 8.75.0","status":"affected"},{"version":">= 7.0.0, < 7.30.6","status":"affected"},{"version":"< 6.20.42","status":"affected"}],"vendor":"laravel","product":"framework","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"6.20.42"}],"ecosystem":"Packagist","package":"laravel/framework","purl":"pkg:composer/laravel/framework","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"7.0.0","status":"affected","fixed":"7.30.6"}],"ecosystem":"Packagist","package":"laravel/framework","purl":"pkg:composer/laravel/framework","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"8.0.0","status":"affected","fixed":"8.75.0"}],"ecosystem":"Packagist","package":"laravel/framework","purl":"pkg:composer/laravel/framework","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"6.20.42"}],"ecosystem":"Packagist","package":"illuminate/view","purl":"pkg:composer/illuminate/view","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"7.0.0","status":"affected","fixed":"7.30.6"}],"ecosystem":"Packagist","package":"illuminate/view","purl":"pkg:composer/illuminate/view","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"8.0.0","status":"affected","fixed":"8.75.0"}],"ecosystem":"Packagist","package":"illuminate/view","purl":"pkg:composer/illuminate/view","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"6.20.42"},{"status":"affected","introduced":"7.0.0","fixed":"7.30.6"},{"status":"affected","introduced":"8.0.0","fixed":"8.75.0"}],"vendor":"laravel","product":"framework","cpe":"cpe:2.3:a:laravel:framework:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/laravel/framework/security/advisories/GHSA-66hf-2p6w-jqfw","tags":["exploit","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/laravel/framework/pull/39906","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/laravel/framework/pull/39908","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/laravel/framework/pull/39909","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/laravel/framework/commit/b8174169b1807f36de1837751599e2828ceddb9b","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/laravel/framework/releases/tag/v6.20.42","tags":["release-notes","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/laravel/framework/releases/tag/v7.30.6","tags":["release-notes","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/laravel/framework/releases/tag/v8.75.0","tags":["release-notes","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-43808","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/illuminate/view/CVE-2021-43808.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/laravel/framework/CVE-2021-43808.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/laravel/framework","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-43808","url":"https://www.cve.org/CVERecord?id=CVE-2021-43808","licence":"CVE Terms of Use","modified":"2024-08-04T04:03:08.661Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-66hf-2p6w-jqfw","url":"https://github.com/advisories/GHSA-66hf-2p6w-jqfw","licence":"CC-BY-4.0","modified":"2026-07-08T06:27:53.544Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-43808","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-43808","licence":"Public domain","modified":"2026-06-17T04:11:28.820Z"}],"updatedAt":"2026-11-25T22:24:36.172Z","epss":{"score":0.00825,"percentile":0.58523,"date":"2026-12-01T12:00:22.000Z"}}