{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2023-37897","id":"CVE-2023-37897","title":"Server-side Template Injection (SSTI) in grav","description":"Grav is a file-based Web-platform built in PHP. Grav is subject to a server side template injection (SSTI) vulnerability. The fix for another SSTI vulnerability using `|map`, `|filter` and `|reduce` twigs implemented in the commit `71bbed1` introduces bypass of the denylist due to incorrect return value from `isDangerousFunction()`, which allows to execute the payload prepending double backslash (","descriptionLong":"Grav is a file-based Web-platform built in PHP. Grav is subject to a server side template injection (SSTI) vulnerability. The fix for another SSTI vulnerability using `|map`, `|filter` and `|reduce` twigs implemented in the commit `71bbed1` introduces bypass of the denylist due to incorrect return value from `isDangerousFunction()`, which allows to execute the payload prepending double backslash (`\\\\`). The `isDangerousFunction()` check in version 1.7.42 and onwards retuns `false` value instead of `true` when the `\\` symbol is found in the `$name`. This vulnerability can be exploited if the attacker has access to: 1. an Administrator account, or 2. a non-administrator, user account that has Admin panel access and Create/Update page permissions. A fix for this vulnerability has been introduced in commit `b4c6210` and is included in release version `1.7.42.2`. Users are advised to upgrade. There are no known workarounds for this vulnerability.\n\n","published":"2023-07-18T20:22:13.008Z","updated":"2026-10-28T02:30:52.833142449Z","reserved":"2023-07-10T17:51:29.609Z","status":"Modified","rejected":false,"assigner":"GitHub_M","metric":{"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":"GitHub_M"},"metrics":[{"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":"GitHub_M"},{"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":"github.com"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"NVD"},{"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":"OSV"},{"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":"GitHub"}],"rating":"high","products":["getgrav grav"],"affectedProducts":[{"vendor":"getgrav","product":"grav","defaultStatus":null,"versions":[{"version":"< 1.7.42.2","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"Packagist","name":"getgrav/grav","purl":"pkg:composer/getgrav/grav","ranges":["<1.7.42.2"],"fixed":["1.7.42.2"],"advisory":"GHSA-9436-3gmp-4f53"}],"cwes":["CWE-74","CWE-393"],"aliases":["GHSA-9436-3gmp-4f53"],"references":[{"url":"https://github.com/getgrav/grav/security/advisories/GHSA-9436-3gmp-4f53","tags":["x_refsource_CONFIRM","x_transferred","Exploit","Mitigation","Vendor Advisory","advisory","web"]},{"url":"https://github.com/getgrav/grav/commit/71bbed12f950de8335006d7f91112263d8504f1b","tags":["x_refsource_MISC","x_transferred","Product","fix","web"]},{"url":"https://github.com/getgrav/grav/commit/b4c62101a43051fc7f5349c7d0a5b6085375c1d7","tags":["x_refsource_MISC","x_transferred","Patch","fix","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/37xxx/CVE-2023-37897.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-37897","tags":["advisory"]},{"url":"https://github.com/getgrav/grav","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total"},"epss":0.02809,"epssPercentile":0.86809,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2023-37897","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-37897","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2023-37897","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-9436-3gmp-4f53","ok":true,"note":"GHSA-9436-3gmp-4f53"},{"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-2023-37897","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}