CVE Explorer
CVE-2026-46633
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.
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.26.0"}]}
- cve_program_cvelist_v5affectedurn:baitaphish:normalized-source-record:v2:e70e106eead655daa9845c740ac0757c0521d245804f792fff5a20d4c9dd969a · sha256:6f0cf2e6e9abbf10… · /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:e70e106eead655daa9845c740ac0757c0521d245804f792fff5a20d4c9dd969a · sha256:6f0cf2e6e9abbf10… · /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:e70e106eead655daa9845c740ac0757c0521d245804f792fff5a20d4c9dd969a · sha256:6f0cf2e6e9abbf10… · /containers/cna/problemTypes/0/descriptions/0
Source references
4 source assertions{"name":"https://github.com/twigphp/Twig/commit/679447fa29083043665482ccf7d64372472621b8","tags":["x_refsource_MISC"],"url":"https://github.com/twigphp/Twig/commit/679447fa29083043665482ccf7d64372472621b8"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:e70e106eead655daa9845c740ac0757c0521d245804f792fff5a20d4c9dd969a · sha256:6f0cf2e6e9abbf10… · /containers/cna/references/1
{"name":"https://github.com/twigphp/Twig/commit/e9ff55f6910832428e48a35b2e0748189ad49ae3","tags":["x_refsource_MISC"],"url":"https://github.com/twigphp/Twig/commit/e9ff55f6910832428e48a35b2e0748189ad49ae3"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:e70e106eead655daa9845c740ac0757c0521d245804f792fff5a20d4c9dd969a · sha256:6f0cf2e6e9abbf10… · /containers/cna/references/2
{"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:e70e106eead655daa9845c740ac0757c0521d245804f792fff5a20d4c9dd969a · sha256:6f0cf2e6e9abbf10… · /containers/cna/references/3
{"name":"https://github.com/twigphp/Twig/security/advisories/GHSA-7p85-w9px-jpjp","tags":["x_refsource_CONFIRM"],"url":"https://github.com/twigphp/Twig/security/advisories/GHSA-7p85-w9px-jpjp"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:e70e106eead655daa9845c740ac0757c0521d245804f792fff5a20d4c9dd969a · sha256:6f0cf2e6e9abbf10… · /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.