{"id":"CVE-2026-58657","published":"2026-07-08T13:49:12Z","modified":"2026-10-08T15:23:30Z","title":"Grav - Stored CSS Injection via Markdown Image resize() Action","vendor":"Grav","product":"Grav","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":4.8,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00267,"percentile":0.19182,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://github.com/getgrav/grav/security/advisories/GHSA-ffmg-hfvg-jhg9","tags":["vendor-advisory"]},{"url":"https://github.com/getgrav/grav/commit/6582166173bb8eb5869d96aea384e0e73777c94c","tags":["patch"]},{"url":"https://github.com/getgrav/grav/commit/e03d29aa0d3ece16d73c1ffccfa78df8bf5f28b8","tags":["patch"]},{"url":"https://www.vulncheck.com/advisories/grav-stored-css-injection-via-markdown-image-resize-action","tags":["third-party-advisory"]}],"priority":{"score":7.2,"factors":[{"name":"EPSS percentile","points":3.84},{"name":"CVSS severity","points":3.36}]},"vendorSlug":"grav","affectedVersions":[{"vendor":"Grav","product":"Grav","versions":[">= 2.0.0-rc.9, < 2.0.0"]}],"fixedVersions":[{"vendor":"Grav","product":"Grav","versions":["2.0.0"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2026-07-08T14:21:29.168366Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Packagist","package":"getgrav/grav","vulnerableRanges":[">=2.0.0-rc.9, <2.0.0"],"patched":["2.0.0"],"from":["GHSA-ffmg-hfvg-jhg9"],"provenance":"source"}],"euvd":{"id":"EUVD-2026-42267","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-getgrav-grav-cve-2024-28117","children":[{"from":"CVE-2026-58657","to":"CVE-2026-72820","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["system/src/Grav/Common/Twig/Twig.php"],"commits":["https://github.com/getgrav/grav/commit/6582166173bb8eb5869d96aea384e0e73777c94c","https://github.com/getgrav/grav/commit/e03d29aa0d3ece16d73c1ffccfa78df8bf5f28b8","https://github.com/getgrav/grav/commit/ad9709f865b09b68798fb1ac375b484a8cc1d892"],"basis":"shared function","functions":["processPage"]}]},{"from":"CVE-2026-58657","to":"CVE-2026-72831","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["system/src/Grav/Common/Twig/Twig.php"],"commits":["https://github.com/getgrav/grav/commit/6582166173bb8eb5869d96aea384e0e73777c94c","https://github.com/getgrav/grav/commit/e03d29aa0d3ece16d73c1ffccfa78df8bf5f28b8","https://github.com/getgrav/grav/commit/ad9709f865b09b68798fb1ac375b484a8cc1d892"],"basis":"shared function","functions":["processPage"]}]},{"from":"CVE-2026-58657","to":"CVE-2026-72832","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["system/src/Grav/Common/Twig/Twig.php"],"commits":["https://github.com/getgrav/grav/commit/6582166173bb8eb5869d96aea384e0e73777c94c","https://github.com/getgrav/grav/commit/e03d29aa0d3ece16d73c1ffccfa78df8bf5f28b8","https://github.com/getgrav/grav/commit/ad9709f865b09b68798fb1ac375b484a8cc1d892"],"basis":"shared function","functions":["processPage"]}]}],"packageHistory":[{"cve":"CVE-2026-44738","published":"2026-05-11","fixed":"2.0.0-rc.2","kev":false},{"cve":"CVE-2026-53653","published":"2026-07-10","fixed":"2.0.0-rc.8","kev":false},{"cve":"CVE-2026-55890","published":"2026-07-10","fixed":"2.0.0-rc.9","kev":false,"link":{"from":"CVE-2026-55890","to":"CVE-2026-58657","relation":"successor","confidence":"low","kind":"sequence","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"Packagist:getgrav/grav","fromFixed":"2.0.0-rc.9","toFixed":"2.0.0","daysApart":-2}]}},{"cve":"CVE-2026-58657","published":"2026-07-08","fixed":"2.0.0","kev":false},{"cve":"CVE-2026-59193","published":"2026-07-10","fixed":"2.0.0","kev":false},{"cve":"CVE-2026-61453","published":"2026-07-15","fixed":"2.0.1","kev":false},{"cve":"CVE-2026-61690","published":"2026-08-19","fixed":"2.0.1","kev":false}],"package":"Packagist:getgrav/grav"}}