Skip to main content

Grav CMS CVE-2026-58657

| EUVDEUVD-2026-42267 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-07-08 disclosure@vulncheck.com GHSA-4wj4-79rr-pvff GHSA-ffmg-hfvg-jhg9
4.8
CVSS 4.0 · Vendor: vulncheck
View

Attack ChainAIDerived

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

  1. Recon
    Content editor authenticates to Grav admin panel
  2. Delivery
    Crafts Markdown image URL with CSS payload in resize() parameters
  3. Exploit
    Saves page, persisting injected CSS in flat-file content store
  4. Install
    Admin or reviewer opens page for review
  5. C2
    Grav renders img element with unsanitized style attribute
  6. Execute
    Injected CSS overlay displayed in privileged user's browser
  7. Impact
    UI redress or content-manipulation attack succeeds

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

Two specific conditions must both be satisfied: (1) The attacker must hold an authenticated content editor account in the Grav CMS with write permission to edit Markdown pages - unauthenticated exploitation is not possible. (2) A higher-privileged user (administrator or reviewer) must actively open or preview the crafted page in their browser session, providing the required passive user interaction. The injection is limited strictly to CSS - JavaScript execution is not achievable through this vector because prior hardening in Grav's media pipeline blocks script-bearing payloads. Installations where all editors are trusted administrators, or where no editorial review workflow exists, are not meaningfully exposed. The attack does not require any non-default configuration of Grav, but does require the existence of a role hierarchy separating content editors from privileged reviewers.

Impact

The CVSS 4.0 score of 4.8 reflects the constrained conditions: the attacker must hold a content editor account (PR:H in the vendor-supplied vector, reflecting meaningful write access to the CMS) and a higher-privileged user must actively view the crafted page (UI:P). Real-world risk is meaningful only in multi-tier CMS deployments where untrusted editors exist alongside privileged reviewers or administrators - the classic editorial workflow scenario Grav supports. No KEV listing exists and no EPSS data was provided; no public exploit code has been identified, which aligns with the limited impact class (CSS-only, no JavaScript execution). The C:L/I:L impact ratings are appropriate: the attack enables UI redress and visual deception but cannot directly exfiltrate server-side data or achieve code execution. Environments where all content editors are fully trusted, or where no role separation exists between editors and admins, face negligible realistic exposure despite the network attack vector.

Exploit ScenarioDerived

A lower-privileged content editor logs into the Grav admin panel and creates or edits a Markdown page, embedding an image reference with CSS declarations such as position:fixed;top:0;left:0;width:100vw;height:100vh;background:white injected as resize() parameters. When an administrator or reviewer opens the page for approval, the Grav rendering pipeline writes the injected CSS into the img element's style attribute, causing the admin's browser to display a full-viewport overlay that obscures the legitimate admin interface and can redirect clicks to attacker-controlled elements. No public exploit code has been identified at time of analysis.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Jul 08, 2026

Stored CSS injection in Grav CMS (all 2.0 branch releases through 2.0.0-rc.9) lets a lower-privileged content editor manipulate the visual interface seen by higher-privileged administrators and reviewers. The resize() Markdown media action in Excerpts::processMediaActions() writes caller-controlled values directly into rendered img style attributes without sanitization, despite prior hardening that blocked the ?style= and attribute() vectors. An attacker with editorial access can store a crafted image URL with semicolon-delimited CSS declarations that render a full-viewport overlay when a privileged user views the page, enabling UI redress and content-manipulation attacks. No public exploit has been identified at time of analysis; the vendor-confirmed fix is Grav 2.0.0.

RemediationAI

Upgrade to Grav 2.0.0, which is confirmed by the vendor as the fixed release (GitHub Security Advisory GHSA-ffmg-hfvg-jhg9). The two upstream commits (6582166 and e03d29a) address the missing sanitization in the resize() action's styleAttributes propagation path. If immediate upgrade is not feasible, the most effective compensating control is to restrict Markdown page editing permissions exclusively to fully trusted users, eliminating the lower-privileged editor role that is a prerequisite for exploitation; this has the operational trade-off of collapsing the editorial workflow and requiring administrators to author all content directly. There is no known configuration toggle or WAF rule that can safely block the injection while preserving the resize() media action, because the payload is stored as content rather than delivered via a detectable request parameter.

Affected VersionsENISA

grav 2.0.0-rc.9 <2.0.0

Affected Packages

composer getgrav/grav fix: 2.0.0
euvd grav fix: 2.0.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in composer, euvd

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

Technical ContextAI · show details

Grav is a PHP-based flat-file CMS that processes page content written in Markdown. Its media pipeline supports action modifiers such as resize() applied to image references; these actions are parsed by Excerpts::processMediaActions() and translated into HTML attributes on the rendered img element. The vulnerability arises because the resize() code path was excluded from the sanitization applied to other media action parameters: caller-supplied values flow directly into the styleAttributes of the image object and are serialized into the final style= attribute without encoding or filtering. CWE-79 (Improper Neutralization of Input During Web Page Generation) is the root cause class - the application trusts editor-supplied data as safe CSS content when constructing HTML. The attack does not rely on JavaScript, making it resistant to Content Security Policy rules that block inline scripts while still permitting inline styles.

Know when the next one hits your stack

  • 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 4.8 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N
vuln.today AI 5.4 MEDIUM

PR:L because content editor is a low-privilege role, not admin; UI:R and S:C because impact is realized in a different user's browser session.

3.1 AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:P/VC:L/VI:L/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
High
User Interaction
Passive
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
Low
Vulnerable system: Availability
None
Subsequent system: Confidentiality
Low
Subsequent system: Integrity
Low
Subsequent system: Availability
None

Lifecycle Timeline

1
Patch available
Jul 08, 2026 - 15:01 EUVD

DescriptionCVE.org

Grav before 2.0.0 (affected through 2.0.0-rc.9 and the 2.0 branch) contains a stored CSS injection vulnerability in the Markdown image resize() media action. Prior media hardening rejects direct ?style= payloads and unsafe attribute() fallbacks, but the resize() action in Excerpts::processMediaActions() writes caller-controlled values directly into the image's styleAttributes. A lower-privileged content editor who can edit page Markdown can store a crafted image URL with semicolon-delimited CSS declarations in the resize parameters, which are rendered into the final <img style=...> attribute when a higher-privileged reviewer/admin views the page or preview. This does not require JavaScript execution but enables UI redress/overlay and content-manipulation attacks (e.g., a full-viewport fixed overlay). Fixed in 2.0.0.

Threat Intelligence Overview

EPSS Score
0.2%
Top 88% exploitable
Prevalence
Medium
popular open-source flat-file CMS with active community adoption
Threat Intel
1
1 sources
Exploit
POC
Public exploit code exists
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA GitHub VulDB

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 MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
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· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +24
PoC: +20
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.

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