CVE-2026-48157
Slim has Reflected XSS in the HtmlErrorRenderer
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.
INFO
Published Date :
June 15, 2026, 10:16 p.m.
Last Modified :
Oct. 25, 2026, 11:10 p.m.
Remotely Exploit :
Yes !
Source :
[email protected]
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS | 134c704f-9b21-4f2e-91b3-4a467353bcc0 | |||||
| CVSS 3.1 | MEDIUM | [email protected] | ||||
| CVSS 3.1 | MEDIUM | MITRE-CVE |
Solution
- Update Slim framework to version 4.15.2 or later.
- Avoid passing untrusted data into setTitle() and setDescription().
- Use static, plain-text error messages.
- Register a custom error renderer for HTML.
Public PoC/Exploit Available at Github
CVE-2026-48157 has a 1 public
PoC/Exploit available at Github.
Go to the Public Exploits tab to see the list.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2026-48157.
| URL | Resource |
|---|---|
| https://github.com/slimphp/Slim/releases/tag/4.15.2 | |
| https://github.com/slimphp/Slim/security/advisories/GHSA-53h4-8rc4-f539 |
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2026-48157 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2026-48157
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Complete Library Management System (ILS) - Circulation, OPAC, cataloging, reservations, loans, automatic notifications, plugin system, and Z39.50/SRU server
cataloging dewey-decimal ils isbn library-management opac open-source self-hosted biblioteche books catalog circulation digital-library ebooks library library-catalog koha-alternative
PHP CSS JavaScript TypeScript Shell
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2026-48157 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2026-48157 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Translated by [email protected]
Oct. 25, 2026
Action Type Old Value New Value Added Translation Title: Slim de slimphp, Description: Slim es un micro framework de PHP que permite a los usuarios escribir aplicaciones web y APIs sencillas. En las versiones 4.4.0 a 4.15, si una aplicación utiliza HttpException::setTitle() y/o setDescription() para incluir datos no confiables/derivados de la solicitud en el título o la descripción del error (por ejemplo, ’No se encontraron productos que coincidan con ’{$query}’.’), un atacante podría inyectar HTML/JavaScript arbitrario que se ejecuta en el navegador de la víctima cuando esta encuentra una página de error HTML generada por Slim. La vulnerabilidad está presente incluso con displayErrorDetails = false, ya que el título y la descripción sin escapar se renderizan en esta ruta de error. Las excepciones integradas (HttpNotFoundException, HttpBadRequestException, etc.) vienen con valores predeterminados de texto plano, por lo que una aplicación Slim ’vainilla’ sin código de usuario no es explotable. Solo las aplicaciones que introducen datos no confiables en setTitle() y/o setDescription() se ven afectadas. El problema ha sido solucionado en la versión 4.15.2. Si los desarrolladores no pueden actualizar sus aplicaciones de inmediato, pueden solucionar este problema evitando pasar datos no confiables/derivados de la solicitud a HttpException::setTitle() y setDescription() y utilizando en su lugar una copia de error estática de texto plano. También deberían registrar un renderizador de errores personalizado (una implementación de ErrorRendererInterface, o una subclase de HtmlErrorRenderer que escape el título y la descripción) para el tipo de medio HTML. -
CVE Modified by [email protected]
Jun. 17, 2026
Action Type Old Value New Value Added Affected [{'vendor': 'slimphp', 'product': 'Slim', 'versions': [{'status': 'affected', 'version': '>= 4.4.0, < 4.15.2'}]}] -
CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0
Jun. 17, 2026
Action Type Old Value New Value Added SSVC {'id': 'CVE-2026-48157', 'role': 'CISA Coordinator', 'options': [{'exploitation': 'none'}, {'automatable': 'no'}, {'technicalImpact': 'partial'}], 'version': '2.0.3', 'timestamp': '2026-06-16T12:21:29.106141Z'} -
New CVE Received by [email protected]
Jun. 15, 2026
Action Type Old Value New Value Added 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. Added CVSS V3.1 AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N Added CWE CWE-79 Added Reference https://github.com/slimphp/Slim/releases/tag/4.15.2 Added Reference https://github.com/slimphp/Slim/security/advisories/GHSA-53h4-8rc4-f539