CVE-2026-48157: Slim - Stored XSS
- Cve: CVE-2026-48157
- Name: Slim - Stored XSS
- 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.
- Impact: Attackers can execute arbitrary JavaScript in users' browsers, leading to session hijacking or other client-side attacks.
- Remediation: Update to version 4.15.2 or later; alternatively avoid passing untrusted data to setTitle() and setDescription() and use a custom error renderer that escapes output.
- Vulnerability type: stored_xss
- Vulnerability impact: client_script_exec
- Requirement type: none
- Labels source: projectdiscovery
- Severity: medium
- Cvss score: 6.1
- Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- Epss score: 0.00167
- Epss percentile: 0.05963
- Assignee: [email protected]
- Published at: 2026-06-15T22:16:17Z
- Age in days: 162
- Modified at: 2026-10-25T23:10:00Z
- References total: 2
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2026-48157
- Nvd status: deferred
- Checked, none or zero: patch available, known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, products total, products, rejected by nvd
- Not known: requirements, hackerone
Cwe
| Id | Name |
|---|---|
| CWE-79 | Improper Neutralization of Input During Web Page Generation |
References
| Url | Source | Tags |
|---|---|---|
| https://github.com/slimphp/Slim/releases/tag/4.15.2 | nvd | |
| https://github.com/slimphp/Slim/security/advisories/GHSA-53h4-8rc4-f539 | nvd |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| slimphp/Slim | package, releases, security_advisory | yes | /v1/repositories/slimphp/Slim |
Index
- Repositories: 12
- Repositories high signal: 8
- Packages: 1
Exploitation
- Remote: yes
- Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, authentication required
- Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts