Skip to main content
VulnerabilityPublished

CVE-2026-48157: slimphp Slim · Cross-site Scripting

Affects slimphp SlimSource CVE Database V5

0
Compare

Not known to be exploited · CVSS 6.1 Medium : upgrade to 4.15.2 when convenient.

Data as of 30 Oct 2026, 11:52 UTC

CVSS 3.1 base score
6.1Medium
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.1% chance of exploitation in 30 days – higher than 5% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 4.15.2
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 15 Jun 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 30 Oct 2026.

What to do

Upgrade Slim and slim/slim to 4.15.2.

Affected software

ProductAffectedFixed in
slimphpSlimAffected
  • >=4.4.0 <4.15.2
Fixed in
  • 4.15.2
Packagistslim/slimpkg:composer/slim/slimOther threatsAffected
  • <4.15.2 >=4.4.0
Fixed in
  • 4.15.2

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

A fix is available in SlimPHP version 4.15.2. Developers should upgrade to this version to fully remediate the vulnerability. If immediate upgrading is not possible, developers should avoid passing untrusted or request-derived data into HttpException::setTitle() and setDescription(), using only static, plain-text error messages. Additionally, registering a custom error renderer that properly escapes the title and description for HTML output is recommended to prevent 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.

References

Community reviews

Loading reviews…