Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. slim/slim
  4. ›
  5. CVE-2026-48157

CVE-2026-48157: Slim has Reflected XSS in the HtmlErrorRenderer

June 23, 2026

If an application uses HttpException::setTitle() and/or setDescription() to include untrusted/request-derived data in the error title or description (e.g. "No products found matching '{$query}'."), an attacker could inject arbitrary HTML/JavaScript that executes in the victim’s browser when they encounter an HTML error page generated by Slim.

The vulnerability is present even with displayErrorDetails = false as the unescaped title and description are rendered on this error path.

Built-in exceptions (HttpNotFoundException, HttpBadRequestException, etc.) ship plain-text defaults, so a vanilla Slim app with no user code is not exploitable. Only applications that feed untrusted data into setTitle() and/or setDescription() are affected.

References

  • github.com/advisories/GHSA-53h4-8rc4-f539
  • github.com/slimphp/Slim/releases/tag/4.15.2
  • github.com/slimphp/Slim/security/advisories/GHSA-53h4-8rc4-f539
  • nvd.nist.gov/vuln/detail/CVE-2026-48157

Code Behaviors & Features

Detect and mitigate CVE-2026-48157 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions starting from 4.4.0 before 4.15.2

Fixed versions

  • 4.15.2

Solution

Upgrade to version 4.15.2 or above.

Impact 6.1 MEDIUM

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

Learn more about CVSS

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

packagist/slim/slim/CVE-2026-48157.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:15:51 +0000.