/

CVE-2026-85599

Severity:

HIGH RISK

(7.2)

Stored XSS (CWE-79) in Grav Shortcode Core Components

CVE-2026-85599

Deferred

Vulnerability type

Category:

Stored Cross-Site Scripting

CWE:

CWE-79

Impact:

Client-Side Code Execution and Account Compromise

Severity:

HIGH RISK

(7.2)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Grav Shortcode Core contains stored cross-site scripting vulnerabilities in the [lorem] tag parameter and [details] summary parameter when their contents are rendered without proper escaping. An attacker with page-edit access may store arbitrary HTML or JavaScript that executes in the browsers of page visitors, including administrators.

Affected context

The issue occurs in Grav sites using Shortcode Core where page authors or other users with page-edit permissions can supply values to the affected shortcode parameters. Risk is present when those values are persisted and later included in rendered pages without context-appropriate output encoding, allowing browsers of visitors to interpret attacker-controlled markup or scripts.

Exploit preconditions

  • Attack surface: Publicly rendered Grav pages containing affected shortcodes
  • Required access: Permission to create or edit pages or otherwise control shortcode parameter values
  • Trigger point: A visitor loads a page containing the stored [lorem] or [details] content
  • Why exploitation is possible: Parameter content is stored and rendered without sufficient escaping, causing browser-interpreted HTML or JavaScript to execute in the visitor's security context

Why this happens

The vulnerability results from treating user-controlled shortcode parameters as trusted presentation content. When values are written into HTML output without context-aware encoding or a restrictive sanitization policy, browser markup parsing can convert attacker-supplied data into executable script. This is a stored form of CWE-79: Improper Neutralization of Input During Web Page Generation, commonly known as cross-site scripting.

Potential impact

  • Malicious scripts may execute in visitors' browsers
  • Attacker-controlled code could access data available to the affected session
  • Administrator sessions may be targeted for unauthorized actions
  • Site content or configuration could be modified through privileged browser sessions
  • Visitors could be redirected to fraudulent or malicious content

General mitigation guidance

Mitigation generally focuses on ensuring that shortcode parameters are treated as untrusted data throughout their lifecycle.

Common defensive patterns include:

  • Applying context-appropriate output encoding before inserting values into HTML
  • Allowing only narrowly defined, safe parameter formats where rich text is unnecessary
  • Using a restrictive sanitizer and explicit allowlist when limited markup must be supported
  • Separating trusted administrative content from user-supplied shortcode values
  • Limiting page-edit permissions according to least privilege
  • Protecting session cookies with appropriate browser security attributes and using a strong content security policy where practical
  • Applying the same validation and encoding rules to stored content and rendered previews

How teams detect issues like this

Organizations can identify similar issues through:

  • Static analysis rules that flag unescaped shortcode or template output
  • Code review checks for direct insertion of request, form, or stored content into HTML
  • Tests that render each shortcode parameter using representative markup and script-like input
  • Dynamic application scans for stored payloads appearing in page responses
  • Policy enforcement requiring output encoding or approved sanitization APIs at rendering boundaries
  • Review of authorization controls governing page creation and editing

Automated security review tools may help identify unsafe output flows, but findings should be validated against the rendering context and supported markup requirements.

Sources

SourceLink
github.comgithub.com/getgrav/grav/security/advisories/GHSA-hvm8-wx3f-j774
vulncheck.comvulncheck.com/advisories/grav-shortcode-core-before-6.2.5-stored-xss-via-unescaped-parameters

Frequently asked

questions

An attacker generally needs page-edit access or another authorized path to place content in the affected shortcode parameters. The resulting script can affect any visitor who views the compromised page.

No. Page-edit privileges may be sufficient, although the consequences can be more severe when administrators visit affected pages.

Treat shortcode parameters as untrusted input and apply context-aware output encoding. If limited formatting is required, use a narrowly defined allowlist sanitizer rather than permitting unrestricted markup or scripts.

Combine least-privilege content permissions, secure rendering APIs, automated tests for stored XSS, code review checks for unsafe output, and browser-side defenses such as an appropriate content security policy.

Find out what's already
exploitable in your codebase.