CVE-2026-48157 Details
Description
Slim is a PHP micro framework that enables users to write simple web applications and APIs. In versions 4.4.0 through 4.15, 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. The issue has been fixed in 4.15.2. If developers are unable to immediately update their applications, they can work around this issue by avoiding passing untrusted/request-derived data into HttpException::setTitle() and setDescription() and using static, plain-text error copy instead. They should also register a custom error renderer (an ErrorRendererInterface implementation, or a subclass of HtmlErrorRenderer that escapes the title and description) for the HTML media type.
A reflected cross-site scripting vulnerability has been identified in the Slim PHP micro framework, specifically in versions 4.4.0 through 4.15.1. The issue arises when applications use the HttpException::setTitle() and setDescription() methods to include untrusted or request-derived data in error messages. This allows attackers to inject arbitrary HTML or JavaScript that executes in the browser of anyone viewing the generated HTML error page. The vulnerability exists even when displayErrorDetails is set to false, as the unescaped title and description are still rendered. However, built-in exceptions like HttpNotFoundException and HttpBadRequestException, which use plain-text defaults, are not exploitable. Only applications that introduce untrusted data into the exception title or description are affected.
Users can upgrade to Slim Framework version 4.15.2, where this vulnerability has been patched. If an immediate upgrade is not possible, applications can avoid passing untrusted data into HttpException::setTitle() and setDescription(), and instead use static, plain-text error messages. Additionally, a custom error renderer can be registered for the HTML media type to escape the title and description.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Jun 15, 2026CISA-ADP
Assessed Jun 16, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/slimphp/Slim/releases/tag/4.15.2 | [email protected] | Release NotesVendor |
| https://github.com/slimphp/Slim/security/advisories/GHSA-53h4-8rc4-f539 | [email protected] | AdvisoryRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| Slim | >= 4.4.0, <= 4.15.1 (semver) |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Jun 15, 2026 | New CVE Received | [email protected] |
Volerion