{"schemaVersion":3,"id":"CVE-2026-46636","aliases":["UBUNTU-CVE-2026-46636","DEBIAN-CVE-2026-46636"],"status":"published","duplicateOf":null,"title":null,"description":"Twig is a template language for PHP. From version 1.0.0 to before version 3.27.0, SecurityPolicy::checkMethodAllowed() unconditionally whitelists all method calls on instances of Twig\\Markup. Twig\\Markup is not final, so subclasses inherit the bypass. An application that passes an object of a Markup-derived class into a sandboxed template (typically to mark a chunk of HTML as safe) inadvertently exposes every public method of that subclass to template authors, regardless of the configured allowedMethods list. This issue has been patched in version 3.27.0.","dates":{"published":"2026-09-04T22:07:35.122Z","modified":"2026-09-08T17:38:45.651Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":8.7,"severity":"high","version":"4.0","versionLabel":"v4.0","source":"CVE.org","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","computed":false,"selection":"backend-summary"},"metrics":[{"version":"4.0","versionLabel":"v4.0","source":"CVE.org","score":8.7,"severity":"high","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","exploitability":null,"impact":null,"computed":false},{"version":"4.0","versionLabel":"v4.0","source":"OSV · Ubuntu","score":8.7,"severity":"high","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","exploitability":null,"impact":null,"computed":true},{"version":"4.0","versionLabel":"v4.0","source":"OSV · Debian","score":8.7,"severity":"high","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/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","exploitability":null,"impact":null,"computed":true},{"version":"4.0","versionLabel":"v4.0","source":"NVD","score":8.7,"severity":"high","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/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","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.0057,"percentile":0.46372,"severity":"low","asOf":"2026-10-21T00:00:00.000Z","change":{"pp":0.21200000000000002,"baselineDate":"2026-09-21T00:00:00.000Z","baselineScore":0.00358},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.00358,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.00358,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.00358,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.00358,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.00358,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.00358,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00358,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00358,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00358,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00358,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-10-21T00:00:00.000Z","score":0.0057,"percentile":0.46372}],"last30":[{"date":"2026-09-21T00:00:00.000Z","score":0.00358,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00358,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00358,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.0057,"percentile":null},{"date":"2026-10-21T00:00:00.000Z","score":0.0057,"percentile":0.46372}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-1336","name":"Improper Neutralization of Special Elements Used in a Template Engine","description":"The product uses a template engine to insert or process externally-influenced input, but it does not neutralize or incorrectly neutralizes special elements or syntax that can be interpreted as template expressions or other code directives when processed by the engine.","type":"weakness","status":"Incomplete","abstraction":"Base","likelihoodOfExploit":null,"url":"https://cwe.mitre.org/data/definitions/1336.html"}],"affected":[{"vendor":"debian","product":"php-twig","name":"php-twig","label":"php-twig","ecosystem":"Debian","cpePart":null,"purl":"pkg:deb/debian/php-twig","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null},{"text":"< 3.27.0-0+deb13u1","noFixRecorded":false,"fixedIn":null},{"text":"< 3.27.0-1","noFixRecorded":false,"fixedIn":null}],"versionsText":"All versions (No fix recorded) | < 3.27.0-0+deb13u1 | < 3.27.0-1","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"php-twig","name":"php-twig","label":"php-twig","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/php-twig","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"twigphp","product":"twig","name":"Twig","label":"twig","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 1.0.0, < 3.27.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 1.0.0, < 3.27.0","eol":{"isEol":null,"eolDate":null,"matchMethod":"name_exact","cycle":null,"product":{"name":"twig","label":"Twig","category":"framework"}},"hubHref":"/vendor/twigphp/twig"}],"affectedCount":3,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://github.com/twigphp/Twig/security/advisories/GHSA-64jr-qjx4-w2fh","label":"github.com/twigphp/Twig/security/advisories/GHSA-64jr-qjx4-w2fh","hostname":"github.com","tags":["X Refsource CONFIRM"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-46636","label":"security-tracker.debian.org/tracker/CVE-2026-46636","hostname":"security-tracker.debian.org","tags":["X Refsource MISC","Advisory"]},{"url":"https://security-tracker.debian.org/tracker/DSA-6311-1","label":"security-tracker.debian.org/tracker/DSA-6311-1","hostname":"security-tracker.debian.org","tags":["X Refsource MISC"]},{"url":"https://symfony.com/blog/cve-2026-46636-sandbox-filter-tag-and-function-allow-list-bypass-when-sandbox-state-changes-between-renders","label":"symfony.com/blog/…","hostname":"symfony.com","tags":["X Refsource MISC","REPORT"]},{"url":"http://github.com/twigphp/Twig/releases/tag/v3.27.0","label":"github.com/twigphp/Twig/releases/tag/v3.27.0","hostname":"github.com","tags":["X Refsource MISC"]},{"url":"https://ubuntu.com/security/CVE-2026-46636","label":"ubuntu.com/security/CVE-2026-46636","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-46636","label":"www.cve.org/CVERecord?id=CVE-2026-46636","hostname":"www.cve.org","tags":["REPORT"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2026-09-04T22:07:35.122Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2026-09-08T17:38:45.651Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":35,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-21T15:00:01.056Z","stale":false,"partial":false}}