Skip to main content

Grav CMS EUVDEUVD-2026-42267

| CVE-2026-58657 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-07-08 disclosure@vulncheck.com GHSA-4wj4-79rr-pvff
4.8
CVSS 4.0 · Vendor: vulncheck
Share

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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
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
Privileges Required
High
User Interaction
P
Scope
X

Lifecycle Timeline

2
Analysis Generated
Jul 08, 2026 - 15:17 vuln.today
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.

AnalysisAI

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.

Technical ContextAI

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.

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.

Share

EUVD-2026-42267 vulnerability details – vuln.today

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