Advisory record · GHSA-2g2g-8p8h-fgwm

Twig: XSS in profiler HtmlDumper via unescaped template and profile names

CVSS 5.1 MediumEPSS 0.0029 · 22nd percentile

Published by the GitHub Advisory Database at 5 Jun 2026, 21:46 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

PackageEcosystemAffectedFixed in
twig/twigPackagist>=3.0.0, <3.26.03.26.0
Identifiers
GHSA-2g2g-8p8h-fgwm · CVE-2026-47730 · PKSA-wwb1-81rc-pd65
Weakness (CWE)
CWE-79
Published
5 Jun 2026
Updated
10 Sept 2026

Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

Twig (Packagist package twig/twig) versions 3.0.0 up to but not including 3.26.0 are affected. In the profiler's HtmlDumper, template and profile names are written into HTML output without escaping, so if a template name is attacker-controlled (for example, one supplied by a database-backed loader), injected markup can run in a browser that renders the profiler dump. The source does not say what access an attacker needs beyond controlling the template name. Upgrade to twig/twig 3.26.0 or later, which escapes these values before output.

Written 31 Oct 2026.

Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

Severity and exploitation

ScoreRatingCVSSVectorSource
5.1 Medium 4.0 CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N CNA (GitHub_M)
  • CISA KEV Not listed.
  • EPSS 0.0029, the 22nd percentile, on 16 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

Timeline

  1. 20 May 2026, 07:43 UTC Published by the maintainers as a GitHub repository advisory
  2. 31 Oct 2026, 13:58 UTC First seen by agentprime
  3. 31 Oct 2026, 13:58 UTC Confirmed by OSV

Sources

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.