{"api_version":"1","generated_at":"2026-04-22T16:07:31+00:00","cve":"CVE-2023-37897","urls":{"html":"https://cve.report/CVE-2023-37897","api":"https://cve.report/api/cve/CVE-2023-37897.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2023-37897","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2023-37897"},"summary":{"title":"CVE-2023-37897","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 (`\\\\`). 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.","state":"PUBLIC","assigner":"security-advisories@github.com","published_at":"2023-07-18 21:15:00","updated_at":"2023-07-28 22:24:00"},"problem_types":["CWE-74"],"metrics":[],"references":[{"url":"https://github.com/getgrav/grav/commit/b4c62101a43051fc7f5349c7d0a5b6085375c1d7","name":"https://github.com/getgrav/grav/commit/b4c62101a43051fc7f5349c7d0a5b6085375c1d7","refsource":"MISC","tags":[],"title":"SSTI attack mitigation - GHSA-9436-3gmp-4f53 · getgrav/grav@b4c6210 · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/getgrav/grav/commit/71bbed12f950de8335006d7f91112263d8504f1b","name":"https://github.com/getgrav/grav/commit/71bbed12f950de8335006d7f91112263d8504f1b","refsource":"MISC","tags":[],"title":"more SSTI fixes in Utils::isDangerousFunction() · getgrav/grav@71bbed1 · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://github.com/getgrav/grav/security/advisories/GHSA-9436-3gmp-4f53","name":"https://github.com/getgrav/grav/security/advisories/GHSA-9436-3gmp-4f53","refsource":"MISC","tags":[],"title":"Server-side Template Injection (SSTI) mitigation bypass via incorrect filtering of double backslash · Advisory · getgrav/grav · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://www.cve.org/CVERecord?id=CVE-2023-37897","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-37897","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2023","cve_id":"37897","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"getgrav","cpe5":"grav","cpe6":"1.7.42","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2023","cve_id":"37897","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"getgrav","cpe5":"grav","cpe6":"1.7.42.1","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"data_version":"4.0","data_type":"CVE","data_format":"MITRE","CVE_data_meta":{"ID":"CVE-2023-37897","ASSIGNER":"security-advisories@github.com","STATE":"PUBLIC"},"description":{"description_data":[{"lang":"eng","value":"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"}]},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')","cweId":"CWE-74"}]},{"description":[{"lang":"eng","value":"CWE-393: Return of Wrong Status Code","cweId":"CWE-393"}]}]},"affects":{"vendor":{"vendor_data":[{"vendor_name":"getgrav","product":{"product_data":[{"product_name":"grav","version":{"version_data":[{"version_affected":"=","version_value":"< 1.7.42.2"}]}}]}}]}},"references":{"reference_data":[{"url":"https://github.com/getgrav/grav/security/advisories/GHSA-9436-3gmp-4f53","refsource":"MISC","name":"https://github.com/getgrav/grav/security/advisories/GHSA-9436-3gmp-4f53"},{"url":"https://github.com/getgrav/grav/commit/71bbed12f950de8335006d7f91112263d8504f1b","refsource":"MISC","name":"https://github.com/getgrav/grav/commit/71bbed12f950de8335006d7f91112263d8504f1b"},{"url":"https://github.com/getgrav/grav/commit/b4c62101a43051fc7f5349c7d0a5b6085375c1d7","refsource":"MISC","name":"https://github.com/getgrav/grav/commit/b4c62101a43051fc7f5349c7d0a5b6085375c1d7"}]},"source":{"advisory":"GHSA-9436-3gmp-4f53","discovery":"UNKNOWN"},"impact":{"cvss":[{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"HIGH","baseScore":7.2,"baseSeverity":"HIGH","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"HIGH","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H","version":"3.1"}]}},"nvd":{"publishedDate":"2023-07-18 21:15:00","lastModifiedDate":"2023-07-28 22:24:00","problem_types":["CWE-74"],"metrics":{"baseMetricV3":{"cvssV3":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH","baseScore":8.8,"baseSeverity":"HIGH"},"exploitabilityScore":2.8,"impactScore":5.9}},"configurations":{"CVE_data_version":"4.0","nodes":[{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:getgrav:grav:1.7.42.1:*:*:*:*:*:*:*","cpe_name":[]},{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:getgrav:grav:1.7.42:*:*:*:*:*:*:*","cpe_name":[]}]}]}},"legacy_mitre":{"record":null,"notes":[]}}}