CVE-2026-130735

Grav 2.0.0 before 2.2.18 Twig Injection via Media Metadata and File Names

Published Nov 18, 2026 CVSS 4.0 · 9.3 Critical EPSS n/a KEV · Not listed
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.

Analysis

AI-generated

Technical impact

Grav CMS versions 2.0.0 through 2.2.17 are vulnerable to a Twig injection flaw that allows media‑only users and anonymous uploaders to embed Twig delimiters in image titles, alt text, class, id or file names. An attacker can inject Twig expressions that are rendered by the template engine, potentially executing arbitrary code and revealing unpublished page content. When combined with the autoescape tag, the attacker can serve malicious scripts to any visitor, even super administrators, effectively performing a site‑wide cross‑site scripting attack.

Affected Systems

The affected vendor is Grav, with the Grav CMS product. All releases from 2.0.0 up to but not including 2.2.18 are impacted. Users with media‑only accounts or sites that allow anonymous file uploads can exploit the flaw.

Risk and Exploitability

The CVSS score of 9.3 marks the vulnerability as critical. EPSS data is not available, and the vulnerability is not listed in the CISA KEV catalog. The likely attack vector is through media uploads or editing media metadata, which can be performed by users with limited permissions or anonymously if the site permits. Because the flaw allows remote code execution within the templating engine, the potential impact is high, affecting confidentiality, integrity, and availability of the site and its visitors.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Grav to version 2.2.18 or later.
  • If an upgrade is not immediately possible, remove or restrict the ability for media‑only accounts and anonymous users to upload or edit media titles, alt text, class, id, and file names, effectively blocking the injection vectors.
  • Apply access controls to prevent anonymous uploads or elevate media‑only user privileges to require authenticated, full‑privilege accounts.

Generated by OpenCVE AI on November 18, 2026 at 19:34 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
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.
Title Grav 2.0.0 before 2.2.18 Twig Injection via Media Metadata and File Names
First Time appeared Getgrav
Getgrav grav
Weaknesses CWE-79
CPEs cpe:2.3:a:getgrav:grav:*:*:*:*:*:*:*:*
Vendors & Products Getgrav
Getgrav grav
References
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 9.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Nov 18, 2026, 5:52 PM
Reserved
Nov 17, 2026, 3:40 PM
Status
Deferred
Published
Nov 18, 2026, 12:17 PM
Modified
Nov 18, 2026, 6:19 PM