# CVE-2026-42608: Grav Path Traversal and Arbitrary File Write in FormFlash

Source: https://junglewise.ai/threats/cve-2026-42608-grav-path-traversal-and-arbitrary-file-write-in-formflash  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-05-11. Updated: 2026-05-14  
License: CC BY 4.0 with a link back

CVE-2026-42608 · Severity: critical · CVSS 9.1 · Published 2026-05-11

Grav, a popular file-based content management system, contains a security flaw in how it handles temporary form data. An unauthenticated attacker can exploit this to create unauthorized folders and files on the web server. This could allow an attacker to disrupt website operations, corrupt site data, or potentially change the website's configuration.

Technologies: [Grav](https://junglewise.ai/threats/technologies/grav), [getgrav/grav (Packagist)](https://junglewise.ai/threats/technologies/getgrav-grav). Vendors: [Grav](https://junglewise.ai/threats/vendors/grav), [Packagist](https://junglewise.ai/threats/vendors/packagist).

## Quick answers

**Is CVE-2026-42608 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-42608 being exploited in the wild.

**How severe is CVE-2026-42608?** Critical severity, with a CVSS score of 9.1, published 11 May 2026.

**Which products and versions are affected?** Grav < 2.0.0-beta.2; getgrav/grav (Packagist) < 2.0.0-beta.2, ECOSYSTEM:introduced=0,fixed=2.0.0-beta.2; Trilby Media Grav CMS < 2.0.0-beta.2.

**Is there a fix for CVE-2026-42608?** Yes. getgrav/grav (Packagist): upgrade to 2.0.0-beta.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-42608 attacked?** It is attacked over the network, in a web application.

**Am I affected by CVE-2026-42608?** Check whether you run Grav, getgrav/grav (Packagist) or Trilby Media Grav CMS at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- getgrav/grav (Packagist): upgrade to 2.0.0-beta.2 or later

  ```sh
  composer require getgrav/grav:^2.0.0-beta.2
  ```


## Technical details

A path traversal vulnerability exists in the FormFlash core component of Grav CMS due to insufficient sanitization of the session_id parameter. The FormFlash::__construct() and getTmpDir() methods use the raw session identifier (passed via the __form-flash-id POST parameter) to construct filesystem paths for temporary form storage. An unauthenticated remote attacker can use '../' sequences to escape the intended temporary directory and create arbitrary subdirectories and 'index.yaml' files in any location writable by the web server process, such as configuration or cache folders. This can lead to configuration injection or denial of service. The issue is resolved in version 2.0.0-beta.2 by implementing a strict alphanumeric allowlist for session identifiers.

## Affected products

- getgrav Grav < 2.0.0-beta.2

## Identifiers

- CVE-2026-42608
- GHSA-hmcx-ch82-3fv2

## Timeline

- 2026-04-24: patched: Fix applied to the 2.0 branch
- 2026-04-27: advisory: GitHub Security Advisory published
- 2026-05-11: disclosed: CVE published to NVD

## References

- [https://github.com/getgrav/grav/security/advisories/GHSA-hmcx-ch82-3fv2](https://github.com/getgrav/grav/security/advisories/GHSA-hmcx-ch82-3fv2)

## Related threats

- [Grav allowlist bypass in Flex form processing](https://junglewise.ai/threats/cve-2026-116019-grav-2-0-15-before-2-2-13-contains-an-allowlist-bypass)
- [Grav improper access control in FlexDirectory::dynamicFlexField()](https://junglewise.ai/threats/cve-2026-114660-grav-from-2-0-0-before-2-2-5-contains-an-improper-access-control)
- [Grav information disclosure via Twig HTTP Basic credentials](https://junglewise.ai/threats/cve-2026-114657-grav-from-2-0-0-before-2-2-5-contains-an-information-disclosure)
- [Grav image pixel limit bypass allows resource exhaustion](https://junglewise.ai/threats/cve-2026-112782-grav-1-7-53-before-1-7-53-5-and-2-0-0-rc-8-before-2-2-2-contains)
- [Grav information disclosure via nested Git repositories](https://junglewise.ai/threats/cve-2026-109326-grav-before-2-1-7-contains-an-information-disclosure)
