All vulnerabilities

Servers and applications

GHSA-f4c2-g57p-vcx9

Anonymous visitors can store script-running pages through a public image upload form on Debian and Ubuntu Apache

Severity
High
Published
25 Nov 2026
Last changed
25 Nov 2026
Added to UpHeron
25 Nov 2026
Fixed in
1.7.53.12, 2.2.35
Weakness
Cross-site scripting (CWE-79)Unrestricted file upload (CWE-434)
Sources
Project advisories (GitHub)

Description

Grav's upload file name check does not refuse the extension var, which Apache on Debian and Ubuntu maps to its type-map handler. A file such as photo.var.jpg is accepted as an image, and Apache then serves it as a type map in which the uploader chooses the Content-Type and the body, so it comes back as an HTML page with script that runs on the site's own origin. An anonymous visitor can do this through any public Form plugin file field at its default settings, including a field limited to image/. A publisher, or an account holding only api.media.write, can do the same through the API plugin. The script runs in the session of anyone who opens the file's URL, including a super admin, who can then be made to create a new super-admin account. The precondition is Apache with AddHandler type-map var, which is the default of the Debian and Ubuntu package and of the php:-apache images built on it. nginx, Caddy, lighttpd and IIS have no type-map handler and are not affected.

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

Affected software

SoftwareAffected versions
GravServers and applications · github:getgrav/grav
  • Every version before 1.7.53.12
  • 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