CVE-2026-42607: CWE-94: Improper Control of Generation of Code ('Code Injection') in getgrav grav
CVE-2026-42607 is a critical code injection vulnerability in the Grav file-based web platform. It affects versions prior to 2.0.0-beta.2. An authenticated administrator can exploit this flaw by uploading a crafted ZIP file through the Direct Install tool, bypassing protections against direct PHP uploads. This allows execution of arbitrary PHP code or installation of a persistent web shell, leading to remote code execution. The vulnerability is fixed in version 2.0.0-beta.2.
AI Analysis
Technical Summary
This vulnerability (CVE-2026-42607) in Grav arises from improper control of code generation (CWE-94). Specifically, an authenticated administrator can upload a malicious ZIP archive via the Direct Install tool, circumventing safeguards that prevent direct PHP file uploads. This results in the ability to execute arbitrary PHP code or install a persistent web shell, enabling remote code execution. The issue affects Grav versions before 2.0.0-beta.2 and is resolved in 2.0.0-beta.2.
Potential Impact
Successful exploitation allows an authenticated administrator to execute arbitrary PHP code on the server or install a persistent web shell. This leads to full remote code execution, compromising confidentiality, integrity, and availability of the affected system.
Mitigation Recommendations
Upgrade Grav to version 2.0.0-beta.2 or later, where this vulnerability is fixed. Since no other remediation level or patch links are provided, applying this official fix is the recommended action.
CVE-2026-42607: CWE-94: Improper Control of Generation of Code ('Code Injection') in getgrav grav
Description
CVE-2026-42607 is a critical code injection vulnerability in the Grav file-based web platform. It affects versions prior to 2.0.0-beta.2. An authenticated administrator can exploit this flaw by uploading a crafted ZIP file through the Direct Install tool, bypassing protections against direct PHP uploads. This allows execution of arbitrary PHP code or installation of a persistent web shell, leading to remote code execution. The vulnerability is fixed in version 2.0.0-beta.2.
CVSS v3.1
Score 9.1critical
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
This vulnerability (CVE-2026-42607) in Grav arises from improper control of code generation (CWE-94). Specifically, an authenticated administrator can upload a malicious ZIP archive via the Direct Install tool, circumventing safeguards that prevent direct PHP file uploads. This results in the ability to execute arbitrary PHP code or install a persistent web shell, enabling remote code execution. The issue affects Grav versions before 2.0.0-beta.2 and is resolved in 2.0.0-beta.2.
Potential Impact
Successful exploitation allows an authenticated administrator to execute arbitrary PHP code on the server or install a persistent web shell. This leads to full remote code execution, compromising confidentiality, integrity, and availability of the affected system.
Mitigation Recommendations
Upgrade Grav to version 2.0.0-beta.2 or later, where this vulnerability is fixed. Since no other remediation level or patch links are provided, applying this official fix is the recommended action.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-04-29T00:31:15.725Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a01f78ecbff5d86102f202e
Added to database: 05/11/2026, 15:36:46 UTC
Last enriched: 06/16/2026, 09:26:19 UTC
Last updated: 07/31/2026, 19:22:58 UTC
Views: 130
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.