CVE-2026-48806: Vulnerability in Symfony Twig

Critical. Twig is a template language for PHP. Prior to 3.27.0, ArrayExpression does not guard dynamic mapping keys that are coerced to strings, allowing PHP to invoke __toString() on a Stringable object used as a mapping key without calling SandboxExtension::ensureToStringAllowed(). This issue is fixed in version 3.27.0.

Packagist, CWE-693, CWE-863

Exploitation
None confirmed
Severity
9.1 of 10
Attack likelihood
0.4 % in 30 days
Fix
Fixed version known
Patch deadline
No deadline set

Details

Advisory ID
GHSA-5v5v-ww74-355v
EU ID
EUVD-2026-44513
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Weakness
CWE-693, CWE-863
Published
30 Jun 2026
Last change
24 Oct 2026
Likelihood rank
Higher than 28 % of all rated vulnerabilities
Analysis status
Analyzed
Ecosystem
Packagist

Affected products

Affected versions and the first fixed release

  • Symfony Twig Before 3.27.0. Fixed in 3.27.0

Affected packages

Vulnerable version ranges and fixed releases

  • twig/twig Packagist, Affected through 3.26.0. Fixed in 3.27.0

Advisories

Vendor and security advisories

Patches and fixes

Updates, commits and release notes

Related