All vulnerabilities

Servers and applications

GHSA-m5v2-xm86-jpw7

User managers can delete any server file through an account's avatar and take over the site

Severity
High
Published
25 Nov 2026
Last changed
25 Nov 2026
Added to UpHeron
25 Nov 2026
Fixed in
2.2.35
Weakness
Path traversal (CWE-22)CWE-73
Sources
Project advisories (GitHub)

Description

A Flex account form accepts the account's avatar list from the submitted data and stores each entry's path as the client sent it. The API plugin's avatar delete later removes GRAV_ROOT . '/' . $entry['path'] with no check of where the path points, and for the caller's own account it checks no permission at all. A delegated user manager (an account holding admin.users.read and admin.users.update) who may not touch super admins can store a forged avatar path on their own account and have the API delete any file the web server user can delete. Deleting every account file reopens first-run setup, which then creates a super admin for whoever calls it. The form that submits the forged path is a front-end Flex account form, which a publisher can add to a page. On a site that uses Flex accounts (system.accounts.type: flex, not the default), a plain publisher or a member who can reach an account edit page is enough.

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