CVE-2026-58657
published 2026-07-08CVE-2026-58657: 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…
PriorityP423medium4.8CVSS 3.1
AVNACLPRHUIRSCCLILAN
EPSS
0.27%
17.8th percentile
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 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.
Affected
2 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| getgrav | grav | >= 2.0.0-rc.9 < 2.0.0 | 2.0.0 |
| grav | grav | >= 2.0.0-rc.9 < 2.0.0 | 2.0.0 |
CVSS provenance
nvdv3.14.8MEDIUMCVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N
nvdv4.04.8MEDIUMCVSS: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
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
VulDB
Grav up to 2.0.0-rc.9 Media Action processMediaActions resize injection (EUVD-2026-42267)
vuldb·2026-09-17·CVSS 4.8
CVE-2026-58657 [MEDIUM] Grav up to 2.0.0-rc.9 Media Action processMediaActions resize injection (EUVD-2026-42267)
A vulnerability labeled as problematic has been found in Grav up to 2.0.0-rc.9. This affects the function Excerpts::processMediaActions of the component Media Action Handler. The manipulation of the argument resize results in injection.
This vulnerability is known as CVE-2026-58657. It is possible to launch the attack remotely. No exploit is available.
The affected component should be upgraded.
GHSA
Grav: Stored CSS injection via Markdown image resize() bypasses prior media style sanitizers in Grav
ghsa·2026-09-16
CVE-2026-58657 [MEDIUM] CWE-79 Grav: Stored CSS injection via Markdown image resize() bypasses prior media style sanitizers in Grav
Grav: Stored CSS injection via Markdown image resize() bypasses prior media style sanitizers in Grav
## Summary
Grav 2.0.0-rc.9 and the current 2.0 branch still allow stored CSS injection through Markdown image media actions. The prior media hardening rejects direct `?style=` payloads and unsafe `attribute()` fallbacks, but the adjacent `resize()` action still writes caller-controlled values directly into `styleAttributes`.
A publisher who can edit page Markdown can store a crafted image URL that renders additional CSS declarations in the final `` attribute. This crosses the same lower-privileged publisher to higher-privileged reviewer/admin rendered-content boundary as the earlier media style and attribute advisories.
## Impact
A lower-privileged content editor can persist CSS declar
GHSA
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.
ghsa_unreviewed·2026-07-08
CVE-2026-58657 [MEDIUM] CWE-79 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.
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 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). Fixe
No detection rules found.
No public exploits indexed.
No writeups or analysis indexed.
https://github.com/getgrav/grav/commit/6582166173bb8eb5869d96aea384e0e73777c94chttps://github.com/getgrav/grav/commit/e03d29aa0d3ece16d73c1ffccfa78df8bf5f28b8https://github.com/getgrav/grav/security/advisories/GHSA-ffmg-hfvg-jhg9https://www.vulncheck.com/advisories/grav-stored-css-injection-via-markdown-image-resize-actionhttps://github.com/getgrav/grav/security/advisories/GHSA-ffmg-hfvg-jhg9
2026-07-08
Published