{"schemaVersion":3,"id":"CVE-2026-46633","aliases":["UBUNTU-CVE-2026-46633","DEBIAN-CVE-2026-46633","CGA-2q76-648w-ghff","CGA-v7qp-29rg-mvwq"],"status":"published","duplicateOf":null,"title":null,"description":"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.","dates":{"published":"2026-07-14T21:14:24.916Z","modified":"2026-07-16T03:55:36.587Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":9.8,"severity":"critical","version":"3.1","versionLabel":"v3.1","source":"NVD","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","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:L/UI:N/VC:H/VI:H/VA:H/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:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","exploitability":null,"impact":null,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Ubuntu","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":10,"impact":9.8,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Debian","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":10,"impact":9.8,"computed":true},{"version":"4.0","versionLabel":"v4.0","source":"OSV · Chainguard","score":8.7,"severity":"high","vector":"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","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: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","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.00688,"percentile":0.52106,"severity":"low","asOf":"2026-10-21T00:00:00.000Z","change":{"pp":0,"baselineDate":"2026-09-21T00:00:00.000Z","baselineScore":0.00688},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-10-21T00:00:00.000Z","score":0.00688,"percentile":0.52106}],"last30":[{"date":"2026-09-21T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.00688,"percentile":null},{"date":"2026-10-21T00:00:00.000Z","score":0.00688,"percentile":0.52106}]},"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-94","name":"Improper Control of Generation of Code ('Code Injection')","description":"The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.","type":"weakness","status":"Draft","abstraction":"Base","likelihoodOfExploit":"Medium","url":"https://cwe.mitre.org/data/definitions/94.html"}],"affected":[{"vendor":"chainguard","product":"drupal-11.3","name":"drupal-11.3","label":"drupal-11.3","ecosystem":"Chainguard","cpePart":null,"purl":"pkg:apk/chainguard/drupal-11.3","purlType":"apk","versions":[{"text":"< 11.3.10-r0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 11.3.10-r0","eol":null,"hubHref":null},{"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":"< 3.5.1-1+deb12u3","noFixRecorded":false,"fixedIn":null},{"text":"< 3.27.0-0+deb13u1","noFixRecorded":false,"fixedIn":null},{"text":"< 3.26.0-1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 3.5.1-1+deb12u3 | < 3.27.0-0+deb13u1 | < 3.26.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":"symfony","product":"twig","name":"twig","label":"twig","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 3.26.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 3.26.0","eol":{"isEol":null,"eolDate":null,"matchMethod":"name_exact","cycle":null,"product":{"name":"twig","label":"Twig","category":"framework"}},"hubHref":"/vendor/symfony/twig"},{"vendor":"twigphp","product":"twig","name":"Twig","label":"twig","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 3.26.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 3.26.0","eol":{"isEol":null,"eolDate":null,"matchMethod":"name_exact","cycle":null,"product":{"name":"twig","label":"Twig","category":"framework"}},"hubHref":"/vendor/twigphp/twig"}],"affectedCount":5,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://github.com/twigphp/Twig/security/advisories/GHSA-7p85-w9px-jpjp","label":"github.com/twigphp/Twig/security/advisories/GHSA-7p85-w9px-jpjp","hostname":"github.com","tags":["X Refsource CONFIRM","Advisory","Vendor Advisory"]},{"url":"https://github.com/twigphp/Twig/commit/679447fa29083043665482ccf7d64372472621b8","label":"github.com/twigphp/Twig/commit/679447fa29083043665482ccf7d64372472621b8","hostname":"github.com","tags":["X Refsource MISC","FIX","Patch"]},{"url":"https://github.com/twigphp/Twig/commit/e9ff55f6910832428e48a35b2e0748189ad49ae3","label":"github.com/twigphp/Twig/commit/e9ff55f6910832428e48a35b2e0748189ad49ae3","hostname":"github.com","tags":["X Refsource MISC","FIX","Patch"]},{"url":"https://github.com/twigphp/Twig/releases/tag/v3.26.0","label":"github.com/twigphp/Twig/releases/tag/v3.26.0","hostname":"github.com","tags":["X Refsource MISC","WEB","Release Notes"]},{"url":"https://ubuntu.com/security/CVE-2026-46633","label":"ubuntu.com/security/CVE-2026-46633","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-46633","label":"www.cve.org/CVERecord?id=CVE-2026-46633","hostname":"www.cve.org","tags":["REPORT"]},{"url":"https://symfony.com/blog/cve-2026-46633-php-code-injection-via-use-template-name","label":"symfony.com/blog/cve-2026-46633-php-code-injection-via-use-template-name","hostname":"symfony.com","tags":["REPORT"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-46633","label":"security-tracker.debian.org/tracker/CVE-2026-46633","hostname":"security-tracker.debian.org","tags":["Advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/46xxx/CVE-2026-46633.json","label":"github.com/CVEProject/cvelistV5/tree/main/cves/2026/46xxx/CVE-2026-46633.json","hostname":"github.com","tags":["Advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-46633","label":"nvd.nist.gov/vuln/detail/CVE-2026-46633","hostname":"nvd.nist.gov","tags":["Advisory"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":["CGA-XQ54-X354-R4FF"]},"timeline":[{"kind":"published","date":"2026-07-14T21:14:24.916Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2026-07-16T03:55:36.587Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":70,"level":"high","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-22T00:33:10.369Z","stale":false,"partial":false}}