{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2021-29440","id":"CVE-2021-29440","title":"Twig allowing dangerous PHP functions by default","description":"Grav is a file based Web-platform. 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. The issue was addressed in version 1.7.11.","descriptionLong":"Grav is a file based Web-platform. 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. The issue was addressed in version 1.7.11.","published":"2021-04-13T19:55:13.000Z","updated":"2026-06-17T03:47:38.757Z","reserved":"2021-03-30T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":8.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:H","rating":"high","source":"GitHub_M"},"metrics":[{"version":"3.1","score":8.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:H","rating":"high","source":"GitHub_M"},{"version":"3.1","score":8.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:H","rating":"high","source":"github.com"},{"version":"3.1","score":7.2,"vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"NVD"},{"version":"2.0","score":6.5,"vector":"AV:N/AC:L/Au:S/C:P/I:P/A:P","rating":"medium","source":"NVD"}],"rating":"high","products":["getgrav grav"],"affectedProducts":[{"vendor":"getgrav","product":"grav","defaultStatus":null,"versions":[{"status":"affected","version":"< 1.7.11"}],"platforms":[]}],"packages":[],"cwes":["CWE-94"],"aliases":[],"references":[{"url":"https://github.com/getgrav/grav/security/advisories/GHSA-g8r4-p96j-xfxc","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory"]},{"url":"https://packagist.org/packages/getgrav/grav","tags":["x_refsource_MISC","x_transferred","Product","Third Party Advisory"]},{"url":"http://packetstormsecurity.com/files/162987/Grav-CMS-1.7.10-Server-Side-Template-Injection.html","tags":["x_refsource_MISC","x_transferred","Exploit","Third Party Advisory","VDB Entry"]},{"url":"https://blog.sonarsource.com/grav-cms-code-execution-vulnerabilities","tags":["x_refsource_MISC","x_transferred","Exploit","Third Party Advisory"]}],"patchReferenced":false,"fixAvailable":false,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.29896,"epssPercentile":0.9824,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2021-29440","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-29440","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2021-29440","ok":false,"note":"no open-source package data"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2021-29440","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":["EPSS 30% with CVSS 8.4"],"attention":null}