RCE in Symfony Twig

CVE-2026-46640

Twig is a template language for PHP. From 3.15.0 until 3.26.0, _self.(<string>) and import-alias dynamic attribute syntax can concatenate an attacker-controlled string into a MacroReferenceExpression name without identifier validation, causing raw PHP to be emitted into the generated template source and executed at template-load time. This issue is fixed in version 3.26.0.

Vulnerability class: RCE (Remote Code Execution)

EPSS: 0.006 (47.9th percentile) — read the EPSS interpretation.

CVSS v3 metric

CVSS v3 base score 8.8 (High). Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.

Affected products

Weakness classification (CWE)

References

Frequently asked questions

What is CVE-2026-46640?
CVE-2026-46640 is a high-severity vulnerability in Symfony Twig, classified under Code Injection. CVSS score: 8.8/10. Published 2026-07-14.
How severe is CVE-2026-46640?
High severity. CVSS v3 base score is 8.8 out of 10.