VYPR
Moderate severityNVD Advisory· Published Mar 10, 2025· Updated Mar 10, 2025

Laravel Reflected XSS via Route Parameter in Debug-Mode Error Page

CVE-2024-13919

Description

The Laravel framework versions between 11.9.0 and 11.35.1 are susceptible to reflected cross-site scripting due to an improper encoding of route parameters in the debug-mode error page.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Laravel 11.9.0–11.35.1 contains a reflected XSS vulnerability in the debug-mode error page due to improper encoding of route parameters.

Vulnerability

Overview

The Laravel framework versions 11.9.0 through 11.35.1 are vulnerable to reflected cross-site scripting (XSS) in the debug-mode error page. The root cause is improper HTML encoding of route parameters when the application is in debug mode (APP_DEBUG=true) and returns a 5XX error. The error page embeds route parameter values directly into the HTML without sanitization, using Laravel's Blade templating engine with the {!! !!} syntax, which disables automatic escaping [1][4].

Exploitation

An attacker can craft a malicious URL containing JavaScript payloads in the route parameters. To exploit this, the target application must have debug mode enabled and must be induced to return an HTTP 5XX error (e.g., by triggering an exception). The victim must click the attacker-supplied link while authenticated to the application. The debug error page then renders the malicious payload, executing arbitrary JavaScript in the victim's browser within the origin of the affected web application [1][4].

Impact

Successful exploitation allows an attacker to execute arbitrary JavaScript in the context of the victim's session. This can lead to theft of session cookies, exfiltration of sensitive data, or further actions within the application. The CVSS score is 8.0 (High) with vector AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N, reflecting the need for user interaction and debug mode [4].

Mitigation

The vulnerability was fixed in Laravel version 11.36.0 via pull request #53869 [2]. Users running affected versions should upgrade to 11.36.0 or later. As a workaround, disabling debug mode (APP_DEBUG=false) in production environments eliminates the attack surface, as the error page is not rendered [1][4].

AI Insight generated on May 20, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
laravel/frameworkPackagist
>= 11.9.0, < 11.36.011.36.0

Affected products

3

Patches

1
45287fb2a91c

Escape data (#53869)

https://github.com/laravel/frameworkJeremy AngeleDec 13, 2024via ghsa
1 file changed · +2 2
  • src/Illuminate/Foundation/resources/exceptions/renderer/components/context.blade.php+2 2 modified
    @@ -51,7 +51,7 @@ class="min-w-0 flex-grow"
                     class="min-w-0 flex-grow"
                     style="-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 1rem, #000 calc(100% - 3rem), transparent calc(100% - 1rem))"
                 >
    -                <pre class="scrollbar-hidden mx-5 my-3 overflow-y-hidden text-xs lg:text-sm"><code class="overflow-y-hidden scrollbar-hidden overflow-x-scroll scrollbar-hidden-x">{!! $exception->requestBody() ?: 'No body data' !!}</code></pre>
    +                <pre class="scrollbar-hidden mx-5 my-3 overflow-y-hidden text-xs lg:text-sm"><code class="overflow-y-hidden scrollbar-hidden overflow-x-scroll scrollbar-hidden-x">{{ $exception->requestBody() ?: 'No body data' }}</code></pre>
                 </span>
             </div>
         </div>
    @@ -105,7 +105,7 @@ class="min-w-0 flex-grow"
                         class="min-w-0 flex-grow"
                         style="-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 1rem, #000 calc(100% - 3rem), transparent calc(100% - 1rem))"
                     >
    -                    <pre class="scrollbar-hidden mx-5 my-3 overflow-y-hidden text-xs lg:text-sm"><code class="overflow-y-hidden scrollbar-hidden overflow-x-scroll scrollbar-hidden-x">{!! $routeParametersContext !!}</code></pre>
    +                    <pre class="scrollbar-hidden mx-5 my-3 overflow-y-hidden text-xs lg:text-sm"><code class="overflow-y-hidden scrollbar-hidden overflow-x-scroll scrollbar-hidden-x">{{ $routeParametersContext }}</code></pre>
                     </span>
                 </div>
             </div>
    

Vulnerability mechanics

Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

8

News mentions

0

No linked articles in our index yet.