CVE-2024-28119
HIGH 8.8CVSS 3.1Server Side Template Injection (SSTI) via Twig escape handler
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 the escape function 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. Version 1.7.45 contains a patch for this issue.
- Published
- 21 Mar 2024
- Last modified
- 10 Sep 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-94
- Also known as
- GHSA-2m7x-c7px-hp58
- Sources
- NVDJSONOSV GHSA-2m7x-c7px-hp58JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | HIGH 8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| OSV | GitHub | CVSS 3.1 | HIGH 8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | getgrav | gravcpe:2.3:a:getgrav:grav:*:*:*:*:*:*:*:* |
< 1.7.45 | 1.7.45 |
| OSV | Packagist | getgrav/grav | < 1.7.45 | 1.7.45 |
References
- https://github.com/getgrav/grav/commit/de1ccfa12dbcbf526104d68c1a6bc202a98698fe · Patch, WEB
- https://github.com/getgrav/grav/security/advisories/GHSA-2m7x-c7px-hp58 · Exploit, Vendor Advisory, WEB
- https://github.com/twigphp/Twig/blob/3.x/src/Extension/EscaperExtension.php#L99 · Product, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2024-28119 · ADVISORY
- https://github.com/getgrav/grav · PACKAGE
History
- 25 Nov 2026 20:55 UTC · NVD: first stored (published 21 Mar 2024)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 22 Mar 2024)