CVE-2023-31506
PHP vulnerability analysis and mitigation

Overview

A cross-site scripting (XSS) vulnerability was identified in Grav CMS versions 1.7.44 and earlier. The vulnerability, tracked as CVE-2023-31506, was discovered in April 2023 and publicly disclosed in February 2024. The vulnerability affects the CMS text editor component and allows remote authenticated attackers with editor privileges to execute arbitrary web scripts or HTML via the onmouseover attribute of an ISINDEX element (NVD, PatoHackventuras).

Technical details

The vulnerability is classified as a stored cross-site scripting (XSS) issue that affects the CMS text editor, particularly in areas where content can be published such as articles on the main page. The vulnerability has been assigned a CVSS v3.1 base score of 5.4 (Medium) with the vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N. The flaw specifically allows for the injection of malicious JavaScript code through form fields, which can then be executed when users or administrators access the affected content (NVD).

Impact

When successfully exploited, the vulnerability allows authenticated attackers with editor role or publishing permissions to inject and execute malicious JavaScript code that affects users or administrators accessing the compromised content. This can lead to potential session hijacking, credential theft, or other client-side attacks against application users (PatoHackventuras).

Mitigation and workarounds

Recommended mitigations include performing strict server-side validation for all user-entered data, properly escaping or filtering special characters to prevent execution, and restricting input fields from accepting HTML/JavaScript characters. Users should upgrade to a patched version of Grav CMS (PatoHackventuras).

Additional resources


SourceThis report was generated using AI

Related PHP vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-21857HIGH8.3
  • PHPPHP
  • redaxo/source
NoYesJan 07, 2026
CVE-2025-61676MEDIUM6.1
  • PHPPHP
  • october/system
NoYesJan 10, 2026
CVE-2025-61674MEDIUM6.1
  • PHPPHP
  • october/system
NoYesJan 10, 2026
CVE-2026-21896MEDIUM5.8
  • PHPPHP
  • getkirby/cms
NoYesJan 08, 2026
CVE-2026-22242MEDIUM4.9
  • PHPPHP
  • coreshop/core-shop
NoYesJan 08, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management