Cross-site Scripting (XSS)Weakness · CWE-79

CVE-2026-48157

MEDIUM · 6.1 CVSS v3.1 Published 2026-06-15
Mitigation only
No fix yet — a mitigation exists. There is no fixed release. A documented workaround reduces exposure in the meantime.
See remediation →
68/100
Remediation priority · Elevated
Remotely reachable No privileges

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
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.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

This is a reflected XSS vulnerability in Slim PHP framework where untrusted data passed to HttpException::setTitle() or setDescription() methods is rendered without HTML escaping on error pages, allowing attackers to inject arbitrary HTML/JavaScript that executes in victims' browsers.

MitigationUpdate to Slim 4.15.2 or later; alternatively, avoid passing untrusted data into HttpException methods and implement a custom error renderer that escapes title/description output.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Identify Slim PHP installation
    Check for Slim framework by searching for 'slim/slim' in composer.json or the vendor/slim/slim directory in your project
    Affected if Slim framework is present in the project
  2. Determine installed Slim version
    Run 'composer show slim/slim' or inspect the version field in composer.lock for the slim/slim package
    Affected if The installed version is below 4.15.2 (e.g., 4.15.0, 4.14.0, etc.)
  3. Find HttpException usage in codebase
    Search code for 'new HttpException' or 'HttpException::' calls, particularly setTitle() and setDescription() methods
    Affected if HttpException::setTitle() or setDescription() is called with data that could originate from user input (GET/POST parameters, headers, or external APIs)
  4. Inspect custom error renderer
    Locate the error renderer class (typically in src/Dependencies or a custom ErrorHandler) and check if HTML escaping (htmlspecialchars with ENT_QUOTES) is applied to the title and description fields before output
    Affected if The error renderer outputs $exception->getTitle() or $exception->getDescription() without HTML escaping, or no custom renderer exists and the default Slim error handling is in use

You are affected if Slim framework versions below 4.15.2 are installed AND your code passes untrusted input to HttpException setTitle()/setDescription() methods without custom escaping in your error renderer.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Mitigation available No clean upgrade yet — mitigate in the meantime
Mitigation

Update to Slim 4.15.2 or later; alternatively, avoid passing untrusted data into HttpException methods and implement a custom error renderer that escapes title/description output.

Recommended fix High confidence

4.15.2

  1. Update the Slim framework dependency in your project to version 4.15.2 or later using your package manager (e.g., `composer require slim/slim:^4.15.2` or `composer update slim/slim`).
  2. After upgrading, verify that your application functions correctly with the new version by testing key user flows.
  3. If you are unable to upgrade immediately, implement a workaround by ensuring that any data passed to HttpException::setTitle() and setDescription() is either static text or properly escaped before use.
  4. Alternatively, register a custom HTML error renderer that escapes the title and description fields to prevent XSS.

Generated from the published advisory — verify against the referenced sources before acting.

Have this fixed Scoped from the published advisory
  • Consultation2.0 h
  • Implementation2.0 h
  • Testing2.0 h
  • Review / QA1.0 h
7.0 hours of engineering $1,240
Get help mitigating

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $1,984.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2026-48157 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2026-48157 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data