Skip to main content
VulnerabilityPublished

CVE-2026-58657: Stored CSS injection via Markdown image resize() bypasses prior media style sanitizers in Grav

Affects getgrav/gravSource GCVE Database

0
Compare

Not known to be exploited · CVSS 4.8 Medium : upgrade to 2.0.0 when convenient.

Data as of 31 Oct 2026, 08:20 UTC

CVSS 3.1 base score
4.8Medium
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.2% chance of exploitation in 30 days – higher than 18% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 2.0.0
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 16 Sep 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 30 Oct 2026.

What to do

Upgrade getgrav/grav to 2.0.0.

Affected software

ProductAffectedFixed in
Packagistgetgrav/gravAffected
  • >=2.0.0-rc.9 <2.0.0
  • =2.0.0-rc.9
Fixed in
  • 2.0.0

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

A patch is available that properly sanitizes or type-normalizes all values before they are added to styleAttributes, including those passed through the resize() media action. Specifically, width and height values should be validated as numeric before appending 'px', or a shared CSS declaration builder should be used to reject unsafe characters such as semicolons and colons. Users should apply the official fix to affected Grav versions to remediate this vulnerability. Until patched, restrict Markdown editing privileges to trusted users to reduce risk.

Description

Grav versions 2.0.0-rc.9 and the current 2.0 branch contain a stored CSS injection vulnerability via the Markdown image resize() media action. This allows a lower-privileged content editor to inject arbitrary CSS declarations into the style attribute of rendered images, which are then executed in the context of higher-privileged users viewing the content. The vulnerability arises because the resize() method does not properly sanitize or validate input values before embedding them as CSS style attributes. This can lead to UI redress attacks such as overlays that manipulate the admin interface. A patch is available to properly sanitize these inputs.

References

Community reviews

Loading reviews…