GHSA-53H4-8RC4-F539

Vulnerability from github – Published: 2026-06-23 21:54 – Updated: 2026-06-23 21:54
VLAI
Summary
Slim has Reflected XSS in the HtmlErrorRenderer
Details

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

  • CWE-79: https://cwe.mitre.org/data/definitions/79.html
Show details on source website

{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 4.15.1"
      },
      "package": {
        "ecosystem": "Packagist",
        "name": "slim/slim"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "4.4.0"
            },
            {
              "fixed": "4.15.2"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-48157"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-79"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-06-23T21:54:06Z",
    "nvd_published_at": "2026-06-15T22:16:17Z",
    "severity": "MODERATE"
  },
  "details": "### Impact\n\nIf 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 \u0027{$query}\u0027.\"`), an attacker could inject arbitrary HTML/JavaScript that executes in the victim\u0027s browser when they encounter an HTML error page generated by Slim.\n\nThe vulnerability is present even with `displayErrorDetails = false` as the unescaped title and description are rendered on this error path.\n\nBuilt-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.\n\n### Patches\n\nThe issue is fixed in 4.15.2.\n\n### Workarounds\n\nWithout upgrading, applications can:\n\n- Avoid passing untrusted/request-derived data into `HttpException::setTitle()` and `setDescription()`. Use static, plain-text error copy instead.\n- Register a custom error renderer (an `ErrorRendererInterface` implementation, or a subclass of `HtmlErrorRenderer` that escapes the title and description) for the HTML media type.\n\n### Acknowledgments\n\nSlim is grateful to and thanks GitHub user [0xEr3n](https://github.com/0xEr3n) for reporting this issue.\n\n### Resources\n\n- CWE-79: https://cwe.mitre.org/data/definitions/79.html",
  "id": "GHSA-53h4-8rc4-f539",
  "modified": "2026-06-23T21:54:06Z",
  "published": "2026-06-23T21:54:06Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/slimphp/Slim/security/advisories/GHSA-53h4-8rc4-f539"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-48157"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/slimphp/Slim"
    },
    {
      "type": "WEB",
      "url": "https://github.com/slimphp/Slim/releases/tag/4.15.2"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Slim has Reflected XSS in the HtmlErrorRenderer"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Loading…

Loading…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…