{"id":"CVE-2024-28117","published":"2024-03-21T21:50:47Z","modified":"2024-08-13T16:56:12Z","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, Grav validates accessible functions through the Utils::isDangerousFunction function, but does not impose restrictions on twig functions like twig_array_map, allowing attackers to bypass the validation and execute arbitrary commands. 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. Upgrading to patched version 1.7.45 can mitigate 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.01829,"percentile":0.79366,"provenance":"source"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"references":[{"url":"https://github.com/getgrav/grav/security/advisories/GHSA-qfv4-q44r-g7rv","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/getgrav/grav/commit/de1ccfa12dbcbf526104d68c1a6bc202a98698fe","tags":["x_refsource_MISC"]}],"priority":{"score":22.0,"factors":[{"name":"EPSS percentile","points":15.87},{"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-03-28T19:11:01.243704Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Packagist","package":"getgrav/grav","vulnerableRanges":["<1.7.45"],"patched":["1.7.45"],"from":["GHSA-qfv4-q44r-g7rv"],"provenance":"source"}],"summary":{"text":"Grav, an open-source flat-file content management system, contains a server-side template injection flaw in its Twig processing, where the validation performed by Utils::isDangerousFunction fails to restrict Twig functions such as twig_array_map. An attacker who holds an account permitted to create or edit pages can enable Twig processing in a page's front matter, since Twig runs unsandboxed, and use it to execute arbitrary commands and elevate privileges on the instance.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T07:11:23Z"},"euvd":{"id":"EUVD-2024-0989","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-getgrav-grav-cve-2024-28117","children":[{"from":"CVE-2024-28117","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-28117","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-28117","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"]}]}]}}