{"id":"CVE-2024-28118","published":"2024-03-21T21:55:11Z","modified":"2024-08-02T00:48:49Z","title":"Grav vulnerable to Server Side Template Injection (SSTI)","vendor":"getgrav","product":"grav","tier":"tail","description":{"text":"Grav is an open-source, flat-file content management system. Prior to version 1.7.45, due to the unrestricted access to twig extension class from Grav context, an attacker can redefine config variable. As a result, attacker can bypass a previous SSTI mitigation. Twig processing of static pages can be enabled in the front matter by any administrative user allowed to create or edit pages. As the Twig processor runs unsandboxed, this behavior can be used to gain arbitrary code execution and elevate privileges on the instance. Version 1.7.45 contains a fix for this issue.\n","provenance":"source","from":"CVE.org"},"cvss":{"score":8.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01383,"percentile":0.72311,"provenance":"source"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"references":[{"url":"https://github.com/getgrav/grav/security/advisories/GHSA-r6vw-8v8r-pmp4","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/getgrav/grav/commit/de1ccfa12dbcbf526104d68c1a6bc202a98698fe","tags":["x_refsource_MISC"]}],"priority":{"score":20.6,"factors":[{"name":"EPSS percentile","points":14.46},{"name":"CVSS severity","points":6.16}]},"vendorSlug":"getgrav","affectedVersions":[{"vendor":"getgrav","product":"grav","versions":["< 1.7.45"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2024-07-08T15:04:35.675721Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Packagist","package":"getgrav/grav","vulnerableRanges":["<1.7.45"],"patched":["1.7.45"],"from":["GHSA-r6vw-8v8r-pmp4"],"provenance":"source"}],"summary":{"text":"The flaw is a server-side template injection in Grav, a flat-file content management system, in its Twig template processing of static pages. Attackers can use unrestricted access to a Twig extension class from the Grav context to redefine a config variable and bypass a prior SSTI mitigation, and because Twig runs unsandboxed, this can lead to arbitrary code execution and privilege elevation; exploitation requires an authenticated account with permission to create or edit pages, which can enable Twig processing in the page front matter.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T07:14:38Z"},"euvd":{"id":"EUVD-2024-0998","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-getgrav-grav-cve-2024-28117","children":[{"from":"CVE-2024-28118","to":"CVE-2026-72820","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["system/src/Grav/Common/Twig/Twig.php"],"commits":["https://github.com/getgrav/grav/commit/de1ccfa12dbcbf526104d68c1a6bc202a98698fe","https://github.com/getgrav/grav/commit/ad9709f865b09b68798fb1ac375b484a8cc1d892"],"basis":"shared function","functions":["setTemplate"]}]},{"from":"CVE-2024-28118","to":"CVE-2026-72831","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["system/src/Grav/Common/Twig/Twig.php"],"commits":["https://github.com/getgrav/grav/commit/de1ccfa12dbcbf526104d68c1a6bc202a98698fe","https://github.com/getgrav/grav/commit/ad9709f865b09b68798fb1ac375b484a8cc1d892"],"basis":"shared function","functions":["setTemplate"]}]},{"from":"CVE-2024-28118","to":"CVE-2026-72832","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["system/src/Grav/Common/Twig/Twig.php"],"commits":["https://github.com/getgrav/grav/commit/de1ccfa12dbcbf526104d68c1a6bc202a98698fe","https://github.com/getgrav/grav/commit/ad9709f865b09b68798fb1ac375b484a8cc1d892"],"basis":"shared function","functions":["setTemplate"]}]}]}}