NetSight
medium5.4No CVE yet

GHSA-993v-76jg-67xr

Duplicate Advisory: Grav: Single invalid UTF-8 byte disables every rule in Security::detectXss(), bypassing the page-content XSS safety gate

Impact

### Duplicate Advisory This advisory has been withdrawn because it is a duplicate of GHSA-q2j8-x8hf-63ch. This link is maintained to preserve external references. ### Original Description Grav before 2.0.14 contains a stored cross-site scripting vulnerability in the Security::detectXss() function (system/src/Grav/Common/Security.php). All XSS detection patterns use the PCRE /u (UTF-8) modifier, so a single invalid UTF-8 byte anywhere in page content causes preg_match() to return false for every pattern, silently bypassing the save-time XSS safety gate (Validation::checkSafety()). An authenticated attacker with page-edit permissions (without the security.xss_whitelist privilege) can store malicious JavaScript that executes in the browser of a visitor who views the affected page.

An attacker can exploit this over the network, with a regular user account, but a user has to do something, such as open a file or a link. If it succeeds: low risk of data being read, low risk of data or systems being changed. The attack can reach beyond the vulnerable component itself.

Affected packages

EcosystemPackageAffectedFixed in
composergetgrav/grav< 2.0.14none recorded

Weakness classification

References