Skip to main content

Grav CMS CVE-2026-130735

| EUVDEUVD-2026-128807 CRITICAL
Cross-site Scripting (XSS) (CWE-79)
2026-11-18 VulnCheck GHSA-mc27-cghq-x54v
9.3
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain media-only account or anonymous upload
  2. Delivery
    Inject Twig into image title/filename metadata
  3. Exploit
    Twig evaluated as page content on render
  4. Execution
    Enable autoescape false to emit script
  5. Impact
    Super admin views page, session hijacked

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Three concrete paths, all against Grav 2.0.0-2.2.17 (page Twig is on by default for every page since 2.0.19): (1) an API account scoped to api.media.* only - no page rights - patches an image's title/alt/class/id via the metadata endpoint; (2) an anonymous visitor uploads via a public Form 'type: file' field stored in the page folder, when that page also renders another medium using ?link, ?lightbox, or ?display=thumbnail, so the attacker-controlled file name becomes the thumbnail src; (3) on sites with auto_metadata_exif enabled (OFF by default), anonymous use of the IPTC title. Limiting factors: serving executable script additionally requires a {% autoescape false %} tag; without it the injected Twig can still print protected/unpublished page content or force a 500 error. Allowed characters matter - Utils::checkFilename() blocks <, >, and " but permits {, }, %, |. So exploitation is not truly condition-free: it requires either a media-only account or a non-default page configuration combining public upload with a linked/thumbnailed medium.

Impact

Signals align toward genuine priority but with important nuance. The CVSS 4.0 base is 9.3 (Critical) with AV:N/AC:L/PR:N/UI:N and High VC/VI/VA, and the vuln.today decision label is act_now, reported by VulnCheck. However, the vendor advisory itself downgrades the real-world severity to High (not Critical) because exploitation of a default install needs EITHER a media-only API account (api.media.*) OR an anonymous public upload form on a page that also displays another medium with a link/lightbox/thumbnail option - conditions not universally present. This creates tension: the CVSS vector's PR:N/AC:L understates the configuration/account prerequisites the vendor documents, so the headline 9.3 overstates ease against an average deployment. No CISA KEV listing is present (not confirmed actively exploited) and no EPSS score is supplied, so widespread automated exploitation cannot be asserted. A detailed reproducer is published in the GHSA advisory. Net: a serious, patch-now issue for Grav operators - stored XSS/Twig injection that can escalate to super-admin session takeover - but the act_now urgency should be weighed against whether the deployment exposes a media-only account or an anonymous upload path, which the raw vector does not capture.

Exploit ScenarioDerived

An attacker holding only media rights (an api.media.* account with no page access), or an anonymous visitor uploading through a public form, writes Twig delimiters into an image's title, alt, class, id, or file name - for example a title of {% autoescape false %}<img src=x onerror=alert(document.domain)>{% endautoescape %}. Because that metadata-derived text is HTML-escaped but not Twig-protected, it is evaluated as page-content Twig when any visitor, including a signed-in super admin, loads a page that renders the image, enabling script execution and super-admin session hijack. A working reproducer is published in the GHSA advisory (a photodesk media-only account serving script on /about, a page the account cannot read or edit).

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 18, 2026

Twig injection in Grav 2.0.0 through 2.2.17 lets an account holding only media permissions, or in narrower configurations an anonymous uploader, execute Twig that is embedded in image metadata (title, alt text, class, id) or in uploaded file names. Because that text is HTML-escaped but not Twig-escaped before it reaches Twig::processPage(), injected markup renders on any page displaying the image, so a media-only account can serve script to every visitor of a page it cannot read or edit, including a signed-in super admin, or expose protected and unpublished page content. Exploitation is not condition-free: running script additionally requires a {% autoescape false %} tag, and the anonymous path needs a public file upload form on a page that also renders another medium via ?link, ?lightbox or ?display=thumbnail (or the non-default auto_metadata_exif setting). The vuln.today decision label is act_now; no public exploit code or CISA KEV entry was identified at time of analysis.

RemediationAI

Upgrade Grav to 2.2.18 or later, which rebuilds Markdown image elements from the medium with any Twig opener written as an entity so sidecar- and filename-derived text stays text while the author's own image Twig still executes, and which drops the autoescape tag from the content sandbox defaults; upgrade the API plugin to 1.1.6 in the same change window so media metadata values containing {{, {% or {

are rejected at the API layer (file names are covered by the core fix). Fixed versions per branch: Grav 2.2.18 (composer getgrav/grav >= 2.2.18) and API plugin 1.1.6; the advisory is at https://github.com/getgrav/grav/security/advisories/GHSA-jc8q-6vcj-4x25. Where immediate upgrade is not possible, reduce the exposure paths the advisory identifies: remove or disable public Form type: file upload fields on pages, especially pages that also render another medium through ?link, ?lightbox or ?display=thumbnail (the trade-off is loss of public upload and thumbnail/lightbox functionality); stop rendering link/lightbox/thumbnail variants on pages that accept anonymous uploads, since without the thumbnail src path the attacker-controlled file name is not emitted (side effect: broken gallery views); keep auto_metadata_exif disabled, which is the default, to close the anonymous IPTC title vector (side effect: no automatic EXIF/IPTC metadata extraction); and restrict api.media.* accounts to trusted operators, noting this narrows but does not eliminate the privilege-escalation path from a legitimate media-only account, and injected Twig without {% autoescape false %} can still disclose protected or unpublished page content or force a 500 response. These are partial mitigations; the vendor-released 2.2.18 and 1.1.6 updates are the complete fix, and the act_now priority label reflects that they should be applied promptly.

Affected VersionsENISA

grav 2.0.0 <2.2.18

Affected Packages

euvd grav fix: 2.2.18

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The root cause spans CWE-79 (improper neutralization of input during web page generation) and CWE-1336 (improper neutralization of special elements used in a template engine). Grav's MediaObjectTrait::parsedownElement() builds image markup by pulling title, alt, class and id from the medium's metadata sidecar, while the medium URL places the raw file name into the src attribute. Parsedown escapes HTML metacharacters but leaves the Twig delimiters {{ and {% untouched, and Utils::checkFilename() rejects only <, > and " while accepting {, }, % and |. The placeholder mechanism that protects a page author's own Twig does not cover text derived from a medium, so sidecar- or filename-derived text reaches Twig::processPage() and is evaluated as template code. Page Twig processing is enabled by default for every page since Grav 2.0.19; before that only pages explicitly carrying process.twig: true were exposed. Script execution specifically requires the {% autoescape false %} tag to be reachable, which is why the fix both entity-encodes Twig openers in the Markdown image renderer and removes the autoescape tag from the content sandbox defaults. Grav 1.7 shares the metadata and file-name flow and has unsandboxed content Twig, so a 1.7 page that enables Twig, accepts public uploads and shows a thumbnail link could potentially give an anonymous uploader full Twig; that scenario has not been reproduced and is under separate evaluation.

Know when Grav gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 9.3 CRITICAL
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
vuln.today AI 9.6 CRITICAL

The confirmed reproducer uses a media-only account on default config (PR:L, AC:L); stored Twig/XSS crosses a privilege boundary to the super-admin session (S:C, C:H/I:H); no genuine availability impact beyond a page 500 (A:N).

3.1 AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:L/SI:L/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Nov 18, 2026 - 13:02 EUVD
CVE Published
Nov 18, 2026 - 11:34 cve.org
CRITICAL 9.3

DescriptionCVE.org

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.

Technical POC Analysis

CWE-79/CWE-1336: user-influenced media text is HTML-escaped but not Twig-escaped before Twig::processPage() evaluates it.

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

CVE-2026-130735 is a critical Twig injection vulnerability in Grav (versions 2.0.0 through 2.2.17) that allows users with limited media permissions - or in some configurations, anonymous uploaders - to inject malicious scripts into image metadata or filenames. These scripts then execute on any page displaying the image, affecting all visitors, including administrators, and can lead to data exposure or session compromise. Leadership should prioritize this as it enables low-privileged users to compromise sensitive content and administrative sessions.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: restrict media permissions to trusted roles, disable public file upload forms, disable auto_metadata_exif, sanitize or escape Twig syntax in image metadata and filenames, and deploy a Web Application Firewall to block Twig expressions in uploads.

Threat Intelligence Overview

EPSS Score
0.3%
Top 75% exploitable
Prevalence
Medium
popular open-source flat-file CMS, moderate but non-ubiquitous deployment footprint
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Total

Priority Score

46
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +46
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

More in Grav

View all
CVE-2025-66294 HIGH POC
8.7 Dec 01

Server-side template injection (SSTI) in Grav (getgrav/grav) prior to 1.8.0-beta.27 allows an authenticated attacker hol

CVE-2025-66301 HIGH POC
8.6 Dec 01

Broken access control in Grav CMS (CWE-285) before 1.8.0-beta.27 lets an authenticated editor-level user escalate their

CVE-2025-50286 HIGH POC
8.1 Aug 06

A Remote Code Execution (RCE) vulnerability in Grav CMS v1.7.48 allows an authenticated admin to upload a malicious plug

CVE-2024-34082 CRITICAL POC
9.9 May 15

Grav is a file-based Web platform. Rated critical severity (CVSS 9.9), this vulnerability is remotely exploitable, low a

CVE-2021-47812 CRITICAL POC
9.8 Jan 16

GravCMS 1.10.7 allows unauthenticated remote attackers to write arbitrary YAML configuration files, leading to full serv

CVE-2026-65008 CRITICAL POC
9.3 Jul 21

Remote code execution in Grav CMS 2.0.4 (fixed in 2.0.7) lets an authenticated user holding the admin.pages or api.pages

CVE-2026-75827 CRITICAL POC
9.3 Aug 18

Remote code execution in Grav CMS before 2.0.15 allows attackers holding page-edit or blueprint-config privileges to wri

CVE-2026-75837 CRITICAL POC
9.3 Aug 18

Vertical privilege escalation in Grav CMS before 2.0.14 lets a delegated administrator holding only the admin.users perm

CVE-2026-75828 CRITICAL POC
9.3 Aug 18

Stored cross-site scripting in Grav CMS before 2.0.15 lets authenticated editors smuggle JavaScript event handlers past

CVE-2025-66844 CRITICAL POC
9.1 Dec 15

Server-side request forgery (SSRF) in Grav CMS versions prior to 1.7.49.5 allows remote authenticated attackers to make

CVE-2025-66299 HIGH POC
8.8 Dec 01

Grav is a file-based Web platform. Prior to 1.8.0-beta.27, Grav CMS is vulnerable to a Server-Side Template Injection (S

CVE-2026-72819 HIGH POC
8.7 Aug 14

Remote code execution in Grav CMS before 2.0.13 allows authenticated low-privilege users to plant and execute arbitrary

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy