# CVE-2026-42841: Grav: Stored XSS via Markdown media attribute() action in Grav CMS

- Severity: Medium 6.9 (CVSS:4.0, scored by GitHub_M) `CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:P/VC:H/VI:L/VA:N/SC:H/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.42%, higher than 38% of CVEs (2026-12-02)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-05-05T21:24:08.000Z
- Modified: 2026-10-26T18:10:00.173Z
- Also known as: GHSA-r7fx-8g49-7hhr
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

Grav is a file-based Web platform. Prior to 2.0.0-beta.2, an authenticated user with page editing permissions can inject an executable JavaScript event-handler attribute into rendered image HTML through Grav's Markdown media action syntax. The issue is caused by Markdown image query parameters being converted into callable media actions. The public attribute() media method can be reached this way, allowing an editor to set an arbitrary HTML attribute name and value on the generated image element. This vulnerability is fixed in 2.0.0-beta.2.

(As written by CVE List.)

## Affected

- getgrav grav: < 2.0.0-beta.2; up to 1.8.0; 2.0.0
- getgrav/grav (Packagist): before 2.0.0-beta.2

## Every score

- GitHub_M: CVSS:4.0 6.9 Medium `CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:P/VC:H/VI:L/VA:N/SC:H/SI:L/SA: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`
- GitHub: CVSS:4.0 Medium `CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:P/VC:H/VI:L/VA:N/SC:H/SI:L/SA:N`
- NVD: 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-r7fx-8g49-7hhr> (exploit, patch, vendor-advisory, web)
- <https://github.com/getgrav/grav/commit/5a12f9be8314682c8713e569e330f11805d0a663> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-42841> (advisory)
- <https://github.com/getgrav/grav> (package)

## Sources

- CVE List: [CVE-2026-42841](https://www.cve.org/CVERecord?id=CVE-2026-42841), CVE Terms of Use, modified 2026-05-11
- GitHub Advisory Database: [GHSA-r7fx-8g49-7hhr](https://github.com/advisories/GHSA-r7fx-8g49-7hhr), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-42841](https://nvd.nist.gov/vuln/detail/CVE-2026-42841), Public domain, modified 2026-10-26

---

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