CVE-2026-64628 in gravinfo

Summary

by MITRE • 07/21/2026

Grav contains a stored cross-site scripting vulnerability in shortcode-core attribute handlers where the XSS detection scan only matches payloads containing literal angle brackets, allowing shortcode parameters to bypass validation. Attackers with admin.pages permission can inject malicious JavaScript through shortcode attributes that execute in any viewer's browser, including administrators, enabling session hijacking via admin nonce theft.

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Analysis

by VulDB Data Team • 07/21/2026

The vulnerability exists within Grav's shortcode processing system where the core attribute handlers fail to properly sanitize user input, creating a stored cross-site scripting opportunity. This flaw specifically affects the validation logic that processes shortcode parameters, as the XSS detection mechanism only identifies payloads containing literal angle brackets rather than recognizing encoded or obfuscated variants. The implementation follows a classic CWE-79 pattern of insufficient output encoding in web applications, where user-controllable data flows directly into the application's response without adequate sanitization.

The technical flaw manifests when administrators or users with admin.pages permission create or modify content containing shortcodes with malicious attributes. The validation process performs a shallow scan that misses encoded payloads such as < or < which would normally be detected by more comprehensive XSS filters. This incomplete detection allows attackers to inject JavaScript code through shortcode parameters that get stored in the application's database and subsequently executed whenever the content is rendered to any user, including administrators with elevated privileges.

The operational impact of this vulnerability extends beyond simple script execution as it enables sophisticated attack vectors including session hijacking and privilege escalation. When malicious JavaScript executes in an administrator's browser context, it can capture admin nonces and other sensitive authentication tokens, allowing attackers to impersonate administrative users and gain full control over the Grav installation. This represents a critical security risk that aligns with ATT&CK technique T1548.002 for hijacking user sessions and potentially T1078.004 for account manipulation through stolen credentials.

Mitigation strategies should focus on implementing comprehensive input validation that employs multi-layered XSS detection mechanisms rather than relying solely on literal character matching. The system requires enhanced sanitization routines that properly encode or escape all user-controllable attributes before storage, with particular attention to handling encoded payloads and various obfuscation techniques. Security measures should include implementing Content Security Policy headers to limit script execution, regular security scanning of stored content, and privilege separation between users who can create shortcodes and those who manage administrative functions. Additionally, the application should adopt principle of least privilege for shortcode usage and implement proper output encoding at all points where user input is rendered in web responses, as recommended by OWASP XSS prevention guidelines.

The vulnerability demonstrates a classic security misconfiguration that allows privilege escalation through stored XSS, highlighting the importance of comprehensive input validation and the dangers of incomplete security scanning implementations. This flaw represents a significant risk to Grav installations where administrators may have insufficient separation between content creation and administrative functions, making it particularly dangerous in multi-user environments where non-admin users might be granted permission to create or modify content containing shortcodes.

Organizations should conduct immediate vulnerability assessments to identify all instances of stored shortcodes that could be exploited through this mechanism, while also implementing automated scanning tools that can detect encoded XSS payloads. The fix requires comprehensive code review of the shortcode attribute handling functions and implementation of robust sanitization routines that address multiple attack vectors rather than relying on simple character-based detection patterns that can be easily bypassed by attackers with basic knowledge of XSS evasion techniques.

Responsible

VulnCheck

Reservation

07/20/2026

Disclosure

07/21/2026

Moderation

accepted

CPE

ready

EPSS

0.00150

KEV

no

Activities

low

Sources

Do you need the next level of professionalism?

Upgrade your account now!