SecurityContext

CVE-2024-28117: Grav - Server-Side Template Injection

  • Cve: CVE-2024-28117
  • Name: Grav - Server-Side Template Injection
  • Description: Grav is an open-source, flat-file content management system. Prior to version 1.7.45, Grav validates accessible functions through the Utils::isDangerousFunction function, but does not impose restrictions on twig functions like twig_array_map, allowing attackers to bypass the validation 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. Upgrading to patched version 1.7.45 can mitigate this issue.
  • Impact: Attackers can execute arbitrary code and elevate privileges by exploiting unsandboxed Twig processing.
  • Remediation: Upgrade to version 1.7.45 or later.
  • Vulnerability type: template_injection
  • Vulnerability impact: remote_code_execution, privilege_escalation
  • Requirement type: admin_privileges
  • Requirements: Attacker needs administrative access to create or edit pages
  • Labels source: projectdiscovery
  • Severity: high
  • Cvss score: 8.8
  • Cvss vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
  • Epss score: 0.01394
  • Epss percentile: 0.72946
  • Assignee: [email protected]
  • Published at: 2024-03-21T22:15:11Z
  • Age in days: 978
  • Modified at: 2026-06-17T07:21:00Z
  • Patch available: yes
  • Public exploits total: 1
  • References total: 2
  • Products total: 1
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2024-28117
  • Nvd status: analyzed
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits capped, rejected by nvd
  • Not known: hackerone

Cwe

IdName
CWE-94Improper Control of Generation of Code

Public exploits

UrlSourceAdded date
https://github.com/getgrav/grav/security/advisories/GHSA-qfv4-q44r-g7rvnvd2024-03-21

References

UrlSourceTags
https://github.com/getgrav/grav/commit/de1ccfa12dbcbf526104d68c1a6bc202a98698fenvdPatch
https://github.com/getgrav/grav/security/advisories/GHSA-qfv4-q44r-g7rvnvdExploit, Vendor Advisory

Products

ProductAffectedPlatform boundSourcesUrl
getgrav:grav< 1.7.45nonvd/v1/products/getgrav/grav

Projects

RepositoryLink kindsIndexedUrl
getgrav/gravcommit, fix, package, security_advisoryyes/v1/repositories/getgrav/grav

Index

  • Checked, none or zero: repositories, repositories high signal, packages

Exploitation

  • Public exploit: yes
  • Public exploit count: 1
  • Public exploit first date: 2024-03-21
  • Remote: yes
  • Authentication required: yes
  • Exposed hosts: 1971
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, initial access
  • Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since, hackerone reports