Threat Feed

CVE-2026-130735: Grav 2.0.0 before 2.2.18 Twig Injection via Media Metadata and File Names

Exploitation: None known · CVSS 9.8 Critical · Unauthenticated · Published 2026-11-18

Description

Grav from 2.0.0 before 2.2.18 contains a Twig injection vulnerability that allows media-only accounts and anonymous uploaders to execute Twig by placing delimiters in image titles, alt text, class, id, or file names. Attackers can combine injected Twig with the autoescape tag to serve script to every page visitor, including super admins, or expose unpublished page content.

Enclave's analysis

Grav 2.0.0 up to 2.2.18 evaluates Twig hidden in image metadata and file names. A media-only API account, or an anonymous uploader on a public upload form, can inject it. Outcomes are stored XSS, including against super admins, and leaking unpublished page content. Only the vendor's reproducer description exists, with no exploitation seen. The 9.8 score looks inflated. Upgrade to 2.2.18 and the API plugin to 1.1.6.

Fix

Upgrade grav to 2.2.18; getgrav/grav to 2.2.18; Grav API plugin to 1.1.6.

Vendor advisory

Affected versions

ProductVulnerableFixed in
grav2.0.0 before 2.2.182.2.18
getgrav/grav>=2.0.0 <2.2.182.2.18
Grav API plugin<1.1.6 (metadata values not rejected for Twig openers)1.1.6

Seen in 2 sources