{"id":"CVE-2026-58657","state":"PUBLISHED","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.","publishedAt":"2026-07-08T13:49:12.183Z","updatedAt":"2026-10-08T15:23:30.638Z","severity":{"score":4.8,"label":"Medium","version":"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","source":"VulnCheck"},"assigner":"VulnCheck","products":["Grav Grav"],"affected":[{"vendor":"Grav","product":"Grav","packageURL":"pkg:composer/getgrav/grav","defaultStatus":"unaffected","versions":[{"version":"2.0.0-rc.9","status":"affected","lessThan":"2.0.0","versionType":"semver"},{"version":"2.0.0","status":"unaffected","versionType":"semver"}]}],"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"],"weaknesses":["CWE-79"],"ingestedAt":"2026-10-29T20:12:24.861Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/58xxx/CVE-2026-58657.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-58657","state":"PUBLISHED","datePublished":"2026-07-08T13:49:12.183Z","dateUpdated":"2026-10-08T15:23:30.638Z","assignerShortName":"VulnCheck","assignerOrgId":"83251b91-4cc7-4094-a5c7-464a1b83ea10","dateReserved":"2026-07-01T21:54:37.946Z"},"containers":{"cna":{"title":"Grav - Stored CSS Injection via Markdown Image resize() Action","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"Grav","product":"Grav","packageURL":"pkg:composer/getgrav/grav","defaultStatus":"unaffected","versions":[{"version":"2.0.0-rc.9","status":"affected","lessThan":"2.0.0","versionType":"semver"},{"version":"2.0.0","status":"unaffected","versionType":"semver"}]}],"references":[{"url":"https://github.com/getgrav/grav/security/advisories/GHSA-ffmg-hfvg-jhg9","name":"GitHub Security Advisory (GHSA-ffmg-hfvg-jhg9)","tags":["vendor-advisory"]},{"url":"https://github.com/getgrav/grav/commit/6582166173bb8eb5869d96aea384e0e73777c94c","name":"https://github.com/getgrav/grav/commit/6582166173bb8eb5869d96aea384e0e73777c94c","tags":["patch"]},{"url":"https://github.com/getgrav/grav/commit/e03d29aa0d3ece16d73c1ffccfa78df8bf5f28b8","name":"https://github.com/getgrav/grav/commit/e03d29aa0d3ece16d73c1ffccfa78df8bf5f28b8","tags":["patch"]},{"url":"https://www.vulncheck.com/advisories/grav-stored-css-injection-via-markdown-image-resize-action","name":"VulnCheck Advisory: Grav - Stored CSS Injection via Markdown Image resize() Action","tags":["third-party-advisory"]}],"metrics":[{"format":"CVSS","cvssV4_0":{"version":"4.0","vectorString":"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","attackVector":"NETWORK","attackComplexity":"LOW","attackRequirements":"NONE","privilegesRequired":"HIGH","userInteraction":"PASSIVE","vulnConfidentialityImpact":"LOW","vulnIntegrityImpact":"LOW","vulnAvailabilityImpact":"NONE","subConfidentialityImpact":"LOW","subIntegrityImpact":"LOW","subAvailabilityImpact":"NONE","baseScore":4.8,"baseSeverity":"MEDIUM"}},{"format":"CVSS","cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"HIGH","userInteraction":"REQUIRED","scope":"CHANGED","confidentialityImpact":"LOW","integrityImpact":"LOW","availabilityImpact":"NONE","baseScore":4.8,"baseSeverity":"MEDIUM"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-79","lang":"en","description":"Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')","type":"CWE"}]}],"providerMetadata":{"shortName":"VulnCheck","orgId":"83251b91-4cc7-4094-a5c7-464a1b83ea10","dateUpdated":"2026-10-08T15:23:30.638Z"},"datePublic":"2026-06-22T00:00:00.000Z","cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:a:getgrav:grav:*:*:*:*:*:*:*:*","versionStartIncluding":"2.0.0","versionEndExcluding":"2.0.0"}]}]}],"credits":[{"lang":"en","value":"DavidCarliez","type":"reporter"}],"x_generator":{"engine":"vulncheck-endgame"}},"adp":[{"title":"CISA ADP Vulnrichment","references":[{"url":"https://github.com/getgrav/grav/security/advisories/GHSA-ffmg-hfvg-jhg9","tags":["exploit"]}],"metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-07-08T14:21:29.168366Z","id":"CVE-2026-58657","options":[{"Exploitation":"poc"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-07-08T14:21:36.356Z"}}]}}}