CVE-2026-42611
Received Received - Intake
Stored XSS in Grav CMS

Publication date: 2026-05-11

Last updated on: 2026-05-11

Assigner: GitHub, Inc.

Description
Grav is a file-based Web platform. Prior to 2.0.0-beta.2, a low-privileged (with the ability to create a page) user can cause XSS with the injection of svg element. The XSS can further be escalated to dump the entire system information available under /admin/config/info whenever a Super Admin visits the page; which can further be chained with the use of admin-nonce to do a complete server compromise (RCE). This vulnerability is fixed in 2.0.0-beta.2.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-05-11
Last Modified
2026-05-11
Generated
2026-05-11
AI Q&A
2026-05-11
EPSS Evaluated
N/A
NVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
getgrav grav to 2.0.0-beta.2 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-79 The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability is a stored Cross-Site Scripting (XSS) issue in Grav CMS versions before 2.0.0-beta.2. It allows a low-privileged user who can create pages to inject malicious SVG content containing JavaScript. When a privileged user, such as a Super Admin, views the infected page, the malicious script executes.

The executed script can exfiltrate sensitive system information, including the admin nonce, which is a security token used to prevent CSRF attacks. With this nonce, an attacker can bypass protections and perform further attacks like Remote Code Execution (RCE), potentially compromising the entire server.

The root cause is a flawed XSS filter that fails to block unquoted event handlers and certain dangerous tags like svg, allowing the injection to succeed. This vulnerability was fixed in Grav Core 2.0.0-beta.2 by improving the filtering mechanisms.


How can this vulnerability impact me? :

This vulnerability can have severe impacts including unauthorized access to sensitive system information and full server compromise.

  • A low-privileged user can inject malicious code that executes when a Super Admin visits the page.
  • The attacker can steal sensitive data such as system configuration and admin security tokens.
  • Using the stolen admin nonce, the attacker can bypass CSRF protections and execute arbitrary code on the server (Remote Code Execution).
  • This can lead to complete server takeover, data loss, and disruption of services.

How can this vulnerability be detected on my network or system? Can you suggest some commands?

This vulnerability can be detected by checking for the presence of malicious SVG content injected by low-privileged users with page creation permissions. Specifically, look for pages containing SVG elements with unquoted event handlers such as 'onload' that could trigger JavaScript execution.

Since the vulnerability involves stored Cross-Site Scripting (XSS), detection can involve reviewing page content for suspicious SVG tags or event handlers.

Commands to help detect this might include searching the Grav content files for SVG tags with event handlers. For example, using grep on the Grav pages directory:

  • grep -r --include="*.md" -i '<svg' /path/to/grav/user/pages/
  • grep -r --include="*.md" -i 'onload' /path/to/grav/user/pages/

Additionally, monitoring HTTP requests and responses for suspicious payloads or unusual JavaScript execution when privileged users access pages may help detect exploitation attempts.


What immediate steps should I take to mitigate this vulnerability?

The primary mitigation step is to upgrade Grav CMS to version 2.0.0-beta.2 or later, where the vulnerability has been fixed by improving the XSS filter and expanding the list of dangerous tags.

Until the upgrade can be applied, restrict the ability to create pages to only fully trusted users to prevent low-privileged users from injecting malicious SVG content.

Review and sanitize existing pages for any injected SVG elements with event handlers that could trigger XSS.

Monitor administrative access and audit logs for suspicious activity, especially visits to pages that could contain malicious payloads.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart