
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2025-66305 is a Denial of Service (DoS) vulnerability in the Grav file-based web platform, specifically in the "Languages" submenu of the admin configuration panel (/admin/config/system). The Supported parameter fails to properly validate user input, allowing a malformed value (e.g., a single forward slash /) to cause a fatal regular expression parsing error via PHP's preg_match() function, rendering the entire site unavailable. It affects Grav versions prior to 1.8.0-beta.27, including all 1.7.x releases from 1.7.48 and 1.8.0 beta versions up to beta.26. Disclosed on December 1, 2025, it carries a CVSS v3.1 base score of 4.9 (Medium) and a CVSS v4.0 base score of 6.9 (Medium) (Github Advisory, Grav Security Advisory).
The root cause is improper input validation (CWE-20) combined with an uncaught exception (CWE-248) in system/src/Grav/Common/Language/Language.php. The application dynamically constructs a regular expression in the setActiveFromUri() method using the contents of the Supported language field without sanitizing input via preg_quote() or validating against an allowlist. When a malformed value such as / is saved, it is incorporated directly into a preg_match() call, producing an invalid regex pattern and triggering a fatal E_WARNING error: preg_match(): Unknown modifier 'o' at line 244. The fix in version 1.8.0-beta.27 adds strict allowlist validation in setLanguages() (accepting only patterns matching /^[a-zA-Z]{2,3}(?:[-_][a-zA-Z0-9]{2,8})?$/) and passes a delimiter to getAvailable() for proper regex escaping (Grav Security Advisory, Patch Commit).
Successful exploitation causes an application-wide Denial of Service, making all pages — including admin and login views — completely inaccessible to all users. There is no confidentiality or integrity impact; the sole consequence is total loss of availability for the affected Grav instance. Because the error persists after the malformed configuration is saved, recovery requires direct file system access to correct the configuration, meaning the outage is not self-resolving (Grav Security Advisory).
Exploitation requires high privileges (authenticated admin panel access), limiting the attack surface to trusted or compromised administrator accounts. A proof-of-concept is publicly documented in the GitHub Security Advisory, with the payload being as simple as a single forward slash (/) submitted to the Supported field. There is no evidence of in-the-wild exploitation at this time, no known threat actor attribution, and the vulnerability is not listed in the CISA KEV catalog. The EPSS score is approximately 0.044–0.065%, placing it in the 20th percentile for exploitation likelihood (Github Advisory, Grav Security Advisory).
/admin/config/system, submenu: Languages)./) or an XSS test string that is not a valid language code./admin/config/system with the malicious Supported parameter value.preg_match() regex pattern without sanitization, causing a fatal E_WARNING (preg_match(): Unknown modifier 'o') in Language.php line 244.preg_match(): Unknown modifier 'o' referencing /system/src/Grav/Common/Language/Language.php at line 244; Whoops exception traces with ErrorException (E_WARNING) in Grav application logs.user/config/system.yaml) containing an invalid or unexpected value in the languages.supported field, such as / or special characters not matching standard language codes (e.g., en, en-US)./admin/config/system with a languages.supported parameter containing non-standard values (e.g., /, .*, XSS strings) in web server access logs.Upgrade Grav to version 1.8.0-beta.27 or later, which introduces strict allowlist validation for language codes in setLanguages() and proper regex delimiter escaping in getAvailable() (Patch Commit). As an interim measure, restrict admin panel access to trusted personnel only and enforce the principle of least privilege for admin accounts to reduce the risk of a malicious or compromised admin triggering the vulnerability. If exploitation has already occurred, manually edit user/config/system.yaml to remove or correct the invalid languages.supported value to restore site availability (Grav Security Advisory).
The vulnerability was discovered by Marcelo Queiroz (marcelomulder) of CVE-Hunters and coordinated by nmmorette, with the advisory published by Grav maintainer rhukster on December 1, 2025. No significant broader media coverage or notable community debate has been identified beyond standard vulnerability database aggregation and automated CVE tracking feeds.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."