CVE Explorer
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.
Known exploited
Not asserted
Disputed
No
Stale source
No
Conflicts
0
Affected products and versions
1 source assertion{"product":"Twig","vendor":"twigphp","versions":[{"status":"affected","version":">= 3.15.0, < 3.26.0"}]}
- cve_program_cvelist_v5affectedurn:baitaphish:normalized-source-record:v2:1b9c4ed9cd47034abf67b69af23d9661ebaab669189353e051e2a7f3a6765ab1 · sha256:5a1235f72041fa52… · /containers/cna/affected/0
Provider-owned CVSS observations
1 source assertion{"metric":{"attackComplexity":"LOW","attackRequirements":"NONE","attackVector":"NETWORK","baseScore":8.7,"baseSeverity":"HIGH","privilegesRequired":"LOW","subAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","userInteraction":"NONE","vectorString":"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","version":"4.0","vulnAvailabilityImpact":"HIGH","vulnConfidentialityImpact":"HIGH","vulnIntegrityImpact":"HIGH"},"metric_type":"cvssV4_0"}
- cve_program_cvelist_v5cvssurn:baitaphish:normalized-source-record:v2:1b9c4ed9cd47034abf67b69af23d9661ebaab669189353e051e2a7f3a6765ab1 · sha256:5a1235f72041fa52… · /containers/cna/metrics/0/cvssV4_0
CWE assertions
1 source assertion{"cweId":"CWE-94","description":"CWE-94: Improper Control of Generation of Code ('Code Injection')","lang":"en","type":"CWE"}
- cve_program_cvelist_v5cweurn:baitaphish:normalized-source-record:v2:1b9c4ed9cd47034abf67b69af23d9661ebaab669189353e051e2a7f3a6765ab1 · sha256:5a1235f72041fa52… · /containers/cna/problemTypes/0/descriptions/0
Source references
3 source assertions{"name":"https://github.com/twigphp/Twig/commit/324fa60545694fa6abe85ded9befcb82e1066bc2","tags":["x_refsource_MISC"],"url":"https://github.com/twigphp/Twig/commit/324fa60545694fa6abe85ded9befcb82e1066bc2"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:1b9c4ed9cd47034abf67b69af23d9661ebaab669189353e051e2a7f3a6765ab1 · sha256:5a1235f72041fa52… · /containers/cna/references/1
{"name":"https://github.com/twigphp/Twig/releases/tag/v3.26.0","tags":["x_refsource_MISC"],"url":"https://github.com/twigphp/Twig/releases/tag/v3.26.0"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:1b9c4ed9cd47034abf67b69af23d9661ebaab669189353e051e2a7f3a6765ab1 · sha256:5a1235f72041fa52… · /containers/cna/references/2
{"name":"https://github.com/twigphp/Twig/security/advisories/GHSA-45vw-wh46-2vx8","tags":["x_refsource_CONFIRM"],"url":"https://github.com/twigphp/Twig/security/advisories/GHSA-45vw-wh46-2vx8"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:1b9c4ed9cd47034abf67b69af23d9661ebaab669189353e051e2a7f3a6765ab1 · sha256:5a1235f72041fa52… · /containers/cna/references/0
Attribution and limitations
- CVE Program CVEList V5: Reproduce the MITRE copyright designation and CVE license in copies. Source →
Provider severity values are preserved separately. Baitaphish does not convert them into a risk rating, infer affected products, or treat EPSS as observed exploitation.