# CVE-2026-58657: Grav - Stored CSS Injection via Markdown Image resize() Action

- Severity: Medium 4.8 (CVSS:4.0, scored by VulnCheck) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.27%, higher than 20% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-07-08T13:49:12.183Z
- Modified: 2026-10-08T16:17:23.383Z
- Also known as: GHSA-ffmg-hfvg-jhg9
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: VulnCheck

## 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.

(As written by CVE List.)

## Affected

- Grav Grav: from 2.0.0-rc.9 before 2.0.0 (not affected: 2.0.0)
- getgrav/grav (Packagist): from 2.0.0-rc.9 before 2.0.0

## Every score

- VulnCheck: CVSS:4.0 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`
- VulnCheck: CVSS:3.1 4.8 Medium `CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N`
- GitHub: CVSS:3.1 4.8 Medium `CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://github.com/getgrav/grav/security/advisories/GHSA-ffmg-hfvg-jhg9> (exploit, vendor-advisory, web)
- <https://github.com/getgrav/grav/commit/6582166173bb8eb5869d96aea384e0e73777c94c> (patch, web)
- <https://github.com/getgrav/grav/commit/e03d29aa0d3ece16d73c1ffccfa78df8bf5f28b8> (patch, web)
- <https://www.vulncheck.com/advisories/grav-stored-css-injection-via-markdown-image-resize-action> (third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-58657> (advisory)
- <https://github.com/getgrav/grav> (package)

## Sources

- CVE List: [CVE-2026-58657](https://www.cve.org/CVERecord?id=CVE-2026-58657), CVE Terms of Use, modified 2026-10-08
- GitHub Advisory Database: [GHSA-ffmg-hfvg-jhg9](https://github.com/advisories/GHSA-ffmg-hfvg-jhg9), CC-BY-4.0, modified 2026-09-16
- NVD: [CVE-2026-58657](https://nvd.nist.gov/vuln/detail/CVE-2026-58657), Public domain, modified 2026-10-08

---

Page: https://cve.day/CVE-2026-58657 · Whole record: https://cve.day/CVE-2026-58657.json · Rebuilt by cve.day 2026-11-25T22:59:27.372Z
