LearnCTEM.com, Best CTEM Learning Platform
CVE Intelligence Hub

CVE-2026-46640: Symfony Twig Code Injection (CVSS 8.7)

CVE-2026-46640 is a high severity code injection in Symfony Twig with a CVSS score of 8.7. Apply the vendor fix and confirm exposure on internet facing and business critical assets first.

Last updated: Jul 16, 2026

Quick answer

Direct answer

CVE-2026-46640 is a high severity code injection in Symfony Twig with a CVSS score of 8.7. Apply the vendor fix and confirm exposure on internet facing and business critical assets first.

Risk scores

CVSS base score
8.7HIGH
EPSS probability
0.64%
Higher than 50 percent of all CVEs
CISA KEV
Not listed
CVSS metricWhat it means
Attack vector (AV:N)Network: reachable remotely
Attack complexity (AC:L)Low complexity
Attack requirements (AT:N)No attack requirements
Privileges required (PR:L)Low privileges required
User interaction (UI:N)No user interaction
Confidentiality (VC:H)High confidentiality impact
Integrity (VI:H)High integrity impact
Availability (VA:H)High availability impact

CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

About Symfony Twig

CVE-2026-46640 affects Symfony Twig, a product from Symfony. Before acting, confirm where Symfony Twig runs in your estate, who owns it and whether it is reachable from the internet, because exposure decides real risk more than the score alone.

What the flaw is

In plain terms: 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.

The weakness class is Code Injection. Attacker input is executed as program code.

Based on its CVSS vector, the flaw can be reached over the network, needs some level of access, and needs no user interaction. Apply the vendor fix and confirm exposure on internet facing and business critical assets first.

Affected versions and timeline

FieldDetail
ProductSymfony Twig
Affected versionsTwig from 3.15.0 before 3.26.0
PublishedJul 14, 2026
Last modifiedJul 16, 2026
Added to CISA KEVNot listed
Assigning CNAsecurity-advisories@github.com

How to detect it

  • Inventory every instance of Symfony Twig and record the running version against the affected range above.
  • Check external attack surface scans for internet facing instances of the component.
  • Review logs on affected systems for unusual requests, errors or new processes around the vulnerable function.
  • Confirm with an authenticated vulnerability scan once your scanner has a check for this CVE.

How to fix it

  • Apply the fixed version of Symfony Twig named in the vendor advisory.
  • If patching must wait, restrict network access to the affected service and put it behind authentication or a web application firewall rule.
  • Rescan after the change to prove the exposure is gone, then close the ticket.

CTEM action plan

CTEM stageWhat to do for this CVE
ScopeAdd every business service that depends on Symfony Twig to the current CTEM cycle.
DiscoverFind all instances, including shadow and cloud deployments, and record versions and exposure.
PrioritizeRank using EPSS and CVSS together with asset exposure and business impact.
ValidateConfirm the flaw is reachable and exploitable in your environment and that compensating controls work.
MobilizeAssign the fix to the asset owner with a due date matched to the priority, then verify closure.

CWE References

Technical References

Frequently asked questions

CVE-2026-46640 is a high severity code injection in Symfony Twig with a CVSS score of 8.7. Apply the vendor fix and confirm exposure on internet facing and business critical assets first.

Related CVEs

HIGH7.1
CVE-2026-48807
Symfony Twig

Twig is a template language for PHP. Prior to 3.27.0, the sandbox __toString() checks do not fully cover Traversable values passed to join and replace filters or operands evaluated by the in and not in operators, allowing contained Stringable objects to be coerced to strings without consulting the sandbox policy. This issue is fixed in version 3.27.0.

Jul 14, 2026
HIGH7.1
CVE-2026-48806
Symfony Twig

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.

Jul 14, 2026
HIGH7.7
CVE-2026-46634
Symfony Twig

Twig is a template language for PHP. From 3.9.0 until 3.26.0, template_from_string() compiles an inner template under a synthesized __string_template__<hash> name that can fall outside a SourcePolicyInterface sandbox decision, allowing a sandboxed template that can call template_from_string and include to render an inner template without security policy enforcement. This issue is fixed in version 3.26.0.

Jul 14, 2026
HIGH8.7
CVE-2026-46633
Symfony Twig

Twig is a template language for PHP. Prior to 3.26.0, Compiler::string() does not escape single quotes when a template name from a {% use %} tag is placed inside a PHP single-quoted string literal, allowing a crafted template name to terminate the string and inject arbitrary PHP expressions into the compiled cache file. This issue is fixed in version 3.26.0.

Jul 14, 2026
HIGH8.7
CVE-2026-24425
Symfony Twig

Twig versions 2.16.x and 3.9.0 through 3.25.x contain a sandbox bypass vulnerability when using a SourcePolicyInterface that allows attackers with template rendering capabilities to pass arbitrary PHP callables to sort, filter, map, and reduce filters. Attackers can exploit the runtime check that fails to use the current template source to bypass sandbox restrictions and execute arbitrary code when the sandbox is enabled through a source policy rather than globally.

May 20, 2026
CRITICAL10.0
CVE-2026-8984
Autel Maxicharger Single Charger Firmware

Autel Maxi Charger Single firmware through V1.03.51 allows unauthenticated remote code execution via the service listening on TCP port 9002. A crafted request to the /test endpoint can cause the device to download, extract, and execute attacker-controlled files with root privileges.

Jul 21, 2026
All Symfony CVEs in 2026
Your next credential

Earn your free CTEM certification.

Learn to scope, prioritize, validate and mobilize fixes for CVEs like CVE-2026-46640 with a free CTEM certification.

Free to takePublicly verifiable

Beginner / Practitioner / Program Leader

Explore certifications