CVE Explorer
CVE-2026-47732
Twig is a template language for PHP. Prior to 3.26.0, several Twig language constructs trigger PHP string coercion on a Stringable operand without consulting SecurityPolicy::checkMethodAllowed(), allowing a sandboxed template author to invoke __toString() on objects reachable in the render context through conditional expressions, comparison operators, tests, template-loading tags, dynamic attribute names, spread arguments, the do tag, and the .. range operator. This issue is fixed in version 3.2
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:b0c0a20c85dfa22e33889ef5b40eef1eef4a2117227a7ba4b616b58ac61975f4 · sha256:704b572cce2054b5… · /containers/cna/affected/0
Provider-owned CVSS observations
1 source assertion{"metric":{"attackComplexity":"LOW","attackRequirements":"NONE","attackVector":"NETWORK","baseScore":7.1,"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:L/VA:N/SC:N/SI:N/SA:N","version":"4.0","vulnAvailabilityImpact":"NONE","vulnConfidentialityImpact":"HIGH","vulnIntegrityImpact":"LOW"},"metric_type":"cvssV4_0"}
- cve_program_cvelist_v5cvssurn:baitaphish:normalized-source-record:v2:b0c0a20c85dfa22e33889ef5b40eef1eef4a2117227a7ba4b616b58ac61975f4 · sha256:704b572cce2054b5… · /containers/cna/metrics/0/cvssV4_0
CWE assertions
1 source assertion{"cweId":"CWE-863","description":"CWE-863: Incorrect Authorization","lang":"en","type":"CWE"}
- cve_program_cvelist_v5cweurn:baitaphish:normalized-source-record:v2:b0c0a20c85dfa22e33889ef5b40eef1eef4a2117227a7ba4b616b58ac61975f4 · sha256:704b572cce2054b5… · /containers/cna/problemTypes/0/descriptions/0
Source references
3 source assertions{"name":"https://github.com/twigphp/Twig/commit/447d0b2331e01b8fc6e08119ac984e1ef50caef9","tags":["x_refsource_MISC"],"url":"https://github.com/twigphp/Twig/commit/447d0b2331e01b8fc6e08119ac984e1ef50caef9"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:b0c0a20c85dfa22e33889ef5b40eef1eef4a2117227a7ba4b616b58ac61975f4 · sha256:704b572cce2054b5… · /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:b0c0a20c85dfa22e33889ef5b40eef1eef4a2117227a7ba4b616b58ac61975f4 · sha256:704b572cce2054b5… · /containers/cna/references/2
{"name":"https://github.com/twigphp/Twig/security/advisories/GHSA-pr2w-4gpj-cpq4","tags":["x_refsource_CONFIRM"],"url":"https://github.com/twigphp/Twig/security/advisories/GHSA-pr2w-4gpj-cpq4"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:b0c0a20c85dfa22e33889ef5b40eef1eef4a2117227a7ba4b616b58ac61975f4 · sha256:704b572cce2054b5… · /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.