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

- Severity: Medium 6.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.26%, higher than 11% of CVEs (2026-11-30)
- Published: 2026-06-15T20:59:23.876Z
- Modified: 2026-10-25T23:10:00.167Z
- Also known as: GHSA-53h4-8rc4-f539
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- slimphp Slim: >= 4.4.0, < 4.15.2
- slim/slim (Packagist): from 4.4.0 before 4.15.2

## Every score

- GitHub_M: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- GitHub: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://github.com/slimphp/Slim/security/advisories/GHSA-53h4-8rc4-f539> (web)
- <https://github.com/slimphp/Slim/releases/tag/4.15.2> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-48157> (advisory)
- <https://github.com/slimphp/Slim> (package)

## Sources

- CVE List: [CVE-2026-48157](https://www.cve.org/CVERecord?id=CVE-2026-48157), CVE Terms of Use, modified 2026-06-16
- GitHub Advisory Database: [GHSA-53h4-8rc4-f539](https://github.com/advisories/GHSA-53h4-8rc4-f539), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-48157](https://nvd.nist.gov/vuln/detail/CVE-2026-48157), Public domain, modified 2026-10-25

---

Page: https://cve.day/CVE-2026-48157 · Whole record: https://cve.day/CVE-2026-48157.json · Rebuilt by cve.day 2026-11-25T22:59:24.713Z
