GIVE YOUR AGENT THE EVIDENCE

Set up in your agent.

One prompt to get started. Paste it into your coding agent to connect cve.new through MCP and bring vulnerability context into your workflow.

Your agent needs remote MCP support and access to https://cve.new/mcp.

Read the setup guide

GIVE YOUR AGENT THE EVIDENCE

Investigate in your agent.

Turn this advisory into a focused investigation. Ask your agent to check your project’s versions, explain the evidence, and suggest a compatible fix.

Your agent needs remote MCP support and access to https://cve.new/mcp.

Read the setup guide

All vulnerabilities
GHSA-53h4-8rc4-f539medium6.1

Slim has Reflected XSS in the HtmlErrorRenderer

Check your stack

The advisory, in context

Impact

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.

Patches

The issue is fixed in 4.15.2.

Workarounds

Without upgrading, applications can:

  • Avoid passing untrusted/request-derived data into HttpException::setTitle() and setDescription(). Use static, plain-text error copy instead.
  • Register a custom error renderer (an ErrorRendererInterface implementation, or a subclass of HtmlErrorRenderer that escapes the title and description) for the HTML media type.

Acknowledgments

Slim is grateful to and thanks GitHub user 0xEr3n for reporting this issue.

Resources

Affected packages

Start with the recorded fix for your release branch. Check your installed version and test compatibility before upgrading. Fixing this advisory does not rule out other vulnerabilities in the release.

slim/slim Packagist
Ecosystem versions

From 4.4.0 before 4.15.2

Fixed in 4.15.2

15 explicitly affected versions

4.10.0, 4.11.0, 4.12.0, 4.13.0, 4.14.0, 4.15.0, 4.15.1, 4.4.0, 4.5.0, 4.6.0, 4.7.0, 4.7.1, 4.8.0, 4.8.1, 4.9.0

View affected-version evidence
{
  "ranges": [
    {
      "events": [
        {
          "introduced": "4.4.0"
        },
        {
          "fixed": "4.15.2"
        }
      ],
      "type": "ECOSYSTEM"
    }
  ],
  "versions": [
    "4.10.0",
    "4.11.0",
    "4.12.0",
    "4.13.0",
    "4.14.0",
    "4.15.0",
    "4.15.1",
    "4.4.0",
    "4.5.0",
    "4.6.0",
    "4.7.0",
    "4.7.1",
    "4.8.0",
    "4.8.1",
    "4.9.0"
  ]
}

References