CVE-2024-28119 json
Grav vulnerable to Server Side Template Injection (SSTI) via Twig escape handler
published 2024-03-21 2 y ago modified 2026-09-10 1 mo ago also EUVD-2024-0788 , GHSA-2m7x-c7px-hp58
- cvss
- 8.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.6%
- EPSS 1.6% chance of exploitation in 30 days, percentile 75%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- no
- Technical impact
- total
- Assessed
- 2 y ago
Exploit prediction
1.58% chance of exploitation in the next 30 days, higher than 75% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/getgrav/grav/security/advisories/GHSA-2m7x-c7px-hp58 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| packagist | getgrav/grav | <1.7.45 |
1.7.45 |
Affected products
- getgrav grav
Classification
- Weakness
-
- CWE-94 Improper Control of Generation of Code
References
-
github.com
/getgrav/grav/commit/de1ccfa12dbcbf526104d68c1a6bc202a98698fe
web, patch
-
github.com
/getgrav/grav/security/advisories/GHSA-2m7x-c7px-hp58
web, exploit, vendor-advisory
-
github.com
/twigphp/Twig/blob/3.x/src/Extension/EscaperExtension.php#L99
web, product
-
nvd.nist.gov
/vuln/detail/CVE-2024-28119
advisory
-
github.com
/getgrav/grav
package
Sources
- CVE List CVE-2024-28119
- GitHub Advisory GHSA-2m7x-c7px-hp58
- NVD CVE-2024-28119
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.