{"id":"CVE-2026-58657","revision":"6d1d417667214c17ae4a54675dfe222a","records":[{"revision":"6d1d417667214c17ae4a54675dfe222a","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-58657","aliases":[],"title":"Grav - Stored CSS Injection via Markdown Image resize() Action","description":"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.","state":0,"publishedAt":"2026-07-08T13:49:12.183+00:00","modifiedAt":"2026-10-08T15:23:30.638+00:00","affected":[{"ecosystem":"Vendor product","name":"Grav","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"Grav\",\n                    \"product\": \"Grav\",\n                    \"defaultStatus\": \"unaffected\",\n                    \"versions\": [\n                        {\n                            \"version\": \"2.0.0-rc.9\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"semver\",\n                            \"lessThan\": \"2.0.0\"\n                        },\n                        {\n                            \"version\": \"2.0.0\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        }\n                    ],\n                    \"packageURL\": \"pkg:composer/getgrav/grav\"\n                }"}],"metrics":[{"system":"CVSS 4.0","vector":"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","score":4.8,"severity":"MEDIUM"},{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N","score":4.8,"severity":"MEDIUM"}],"references":["https://github.com/getgrav/grav/security/advisories/GHSA-ffmg-hfvg-jhg9","https://github.com/getgrav/grav/commit/6582166173bb8eb5869d96aea384e0e73777c94c","https://github.com/getgrav/grav/commit/e03d29aa0d3ece16d73c1ffccfa78df8bf5f28b8","https://www.vulncheck.com/advisories/grav-stored-css-injection-via-markdown-image-resize-action"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-58657","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-58657","identifiers":["CVE-2026-58657"]},"retained":false,"historicalAffected":[]}],"coverage":[]}