All vulnerabilities

Servers and applications

GHSA-535p-q4f5-hc5c

Publishers can capture the session of a signed-in admin who uploads a file through their form

Severity
High
Published
25 Nov 2026
Last changed
25 Nov 2026
Added to UpHeron
25 Nov 2026
Fixed in
2.2.35
Weakness
Information exposure (CWE-200)CWE-598
Sources
Project advisories (GitHub)

Description

Grav names the folder that holds a form's pending uploads after the visitor's raw PHP session id, so every temporary upload path contains the value of the visitor's session cookie. When the Form plugin saves a submission that has a file field, that path goes into the saved entry. A page editor (publisher) writes a form with a file field and a save action, and when a signed-in visitor, a super admin included, attaches a file and submits it, the publisher reads the session id out of the saved entry and replays it as that user's cookie. The attacker needs page edit rights and a victim who is signed in on the front end and uploads a file through the publisher's form.

FormTrait::getFlashFolder() builds the default folder tmp://forms/[SESSIONID], and the [SESSIONID] and [USERNAME_OR_SESSIONID] tokens expand to $session->getId(). FormFlash builds the same default when no folder is given.

From getgrav/grav's security advisory. Shortened; the full text is there.

Affected software

SoftwareAffected versions
GravServers and applications · github:getgrav/grav
  • From 2.0.0 before 2.2.35

About Grav

free software content management system written in PHP

From Wikidata, CC0 1.0.
Monthly downloads (Packagist)
1,832Packagist, 22 Nov 2026
Total downloads (Packagist)
93,086Packagist, 22 Nov 2026
GitHub stars
15,733GitHub, 22 Nov 2026
Forks
1,428GitHub, 22 Nov 2026
Latest release
2.2.32GitHub, 22 Nov 2026
Released
20 Nov 2026GitHub
License
MIT LicenseWikidata
Written in
PHPWikidata
First published on GitHub
2 Aug 2014GitHub

References