CVE-2026-42845
Received Received - Intake
Unauthenticated File Upload in Grav Form Plugin

Publication date: 2026-05-11

Last updated on: 2026-05-11

Assigner: GitHub, Inc.

Description
The form plugin for Grav adds the ability to create and use forms. Prior to 9.1.0 , there is an unauthenticated page-content overwrite via file upload (GHSA-w4rc-p66m-x6qq). Public form uploads now strip path components from the POST-supplied filename and hard-block page-content extensions (`md`, `yaml`, `yml`, `json`, `twig`, `ini`) regardless of the configurable dangerous-extensions list. A permissive `accept` policy combined with the default `destination: self@` could otherwise let an attacker overwrite the page's own `.md` and pivot to super-admin via a `process: save` action. This vulnerability is fixed in 9.1.0.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-05-11
Last Modified
2026-05-11
Generated
2026-05-11
AI Q&A
2026-05-11
EPSS Evaluated
N/A
NVD
Affected Vendors & Products
Showing 2 associated CPEs
Vendor Product Version / Range
grav form_plugin to 9.1.0 (exc)
getgrav grav-plugin-form to 9.1.0 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-73 The product allows user input to control or influence paths or file names that are used in filesystem operations.
Attack-Flow Graph
AI Powered Q&A
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:

The vulnerability in the Grav Form plugin allows unauthenticated attackers to overwrite page content files and potentially escalate privileges to super-admin. This unauthorized access and modification of content could lead to unauthorized disclosure or alteration of sensitive data.

Such unauthorized access and data manipulation could negatively impact compliance with common standards and regulations like GDPR and HIPAA, which require protection of data integrity, confidentiality, and access controls.

However, the provided information does not explicitly discuss compliance impacts or specific regulatory requirements.


Can you explain this vulnerability to me?

The CVE-2026-42845 vulnerability affects the Grav CMS Form plugin versions prior to 9.1.0. It allows unauthenticated attackers to overwrite existing page content files by exploiting a file upload feature. The issue arises because the plugin accepts a POST-supplied filename parameter without properly stripping path components, enabling attackers to upload files that overwrite critical page content files such as .md files.

Additionally, the plugin had a permissive accept policy and a default destination setting that could let attackers overwrite page content files and then escalate privileges to super-admin via a process save action. The vulnerability is fixed in version 9.1.0 by stripping path components from filenames and hard-blocking dangerous file extensions like .md, .yaml, .yml, .json, .twig, and .ini during uploads.


How can this vulnerability impact me? :

This vulnerability can allow an unauthenticated attacker to overwrite existing page content files on a Grav CMS site, potentially replacing legitimate content with malicious content.

By overwriting page content files such as .md files, an attacker could manipulate the website's content or inject malicious instructions.

More critically, the attacker could escalate privileges to super-admin by exploiting the overwritten content combined with a process save action, leading to full control over the site.


How can this vulnerability be detected on my network or system? Can you suggest some commands?

Detection of this vulnerability involves checking if the Grav Form plugin version is prior to 9.1.0, as those versions are vulnerable to unauthenticated page-content overwrite via file upload.

Since the vulnerability exploits file uploads that allow overwriting page content files (e.g., .md files), monitoring for unexpected or unauthorized file changes in the Grav pages directory can help detect exploitation attempts.

Suggested commands to detect potential exploitation include:

  • Check the installed Grav Form plugin version: `bin/gpm index | grep form` or inspect the plugin version in the admin panel or composer.json.
  • Monitor recent changes to page content files (e.g., .md files) by checking file modification times: `find user/pages/ -type f -name '*.md' -mtime -7` to find files modified in the last 7 days.
  • Review web server logs for suspicious POST requests to form upload endpoints that include unusual filenames or path traversal attempts.

What immediate steps should I take to mitigate this vulnerability?

The primary mitigation step is to upgrade the Grav Form plugin to version 9.1.0 or later, where the vulnerability is fixed.

The fix includes stripping path components from POST-supplied filenames and hard-blocking dangerous page-content file extensions such as .md, .yaml, .yml, .json, .twig, and .ini during file uploads.

Until the upgrade can be applied, consider restricting file upload capabilities or disabling the form plugin if not needed.

Additionally, review and tighten the file upload accept policies and destination settings to prevent overwriting critical page content files.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart