All vulnerabilities

Servers and applications

GHSA-gh8j-q67c-j53f

RCE via Unsandboxed Email Twig Rendering

Severity
High
Published
10 Aug 2026
Last changed
10 Aug 2026
Added to UpHeron
7 Nov 2026
Fixed in
2.0.16
Weakness
Server-side template injection (CWE-1336)
Sources
Project advisories (GitHub)

Description

Grav 2.0.15 renders page-editor-controlled Email action parameters as unsandboxed Twig templates. An authenticated remote user with only api.access and api.pages.write can place a Twig expression in header.form.process.email.body, publish the page, and submit the form to execute an arbitrary operating-system process as the account running PHP.

The attacker does not need admin.super, admin.pages_twig, api.system.write, an existing machine login, root privileges, environment-variable control, or a working mail server.

user/plugins/api/classes/Api/Controllers/PagesController.php protects page creation and updates with api.pages.write (2.0.15 lines 35 and 380-398):

The partial blueprint validator deliberately ignores keys that are not defined by the page blueprint (AbstractApiController.php, 2.0.15 lines 418-422):

Consequently, a page writer can persist an arbitrary nested header.form.process.email structure.

From getgrav/grav's security advisory. Shortened; the full text is there.

Affected software

SoftwareAffected versions
GravServers and applications · github:getgrav/grav
  • From 2.0.0 before 2.0.16

About Grav

free software content management system written in PHP

From Wikidata, CC0 1.0.
Monthly downloads (Packagist)
1,748Packagist, 15 Nov 2026
Total downloads (Packagist)
92,444Packagist, 15 Nov 2026
GitHub stars
15,725GitHub, 15 Nov 2026
Forks
1,430GitHub, 15 Nov 2026
Latest release
2.2.29GitHub, 15 Nov 2026
Released
11 Nov 2026GitHub
License
MIT LicenseWikidata
Written in
PHPWikidata
First published on GitHub
2 Aug 2014GitHub

References