VYPR
Moderate severityNVD Advisory· Published Mar 19, 2018· Updated Aug 5, 2024

CVE-2018-5233

CVE-2018-5233

Description

Cross-site scripting (XSS) vulnerability in system/src/Grav/Common/Twig/Twig.php in Grav CMS before 1.3.0 allows remote attackers to inject arbitrary web script or HTML via the PATH_INFO to admin/tools.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Grav CMS before 1.3.0 contains a reflected XSS vulnerability in the admin plugin via the PATH_INFO to admin/tools, allowing arbitrary script injection.

Vulnerability

Grav CMS versions prior to 1.3.0 contain a reflected Cross-Site Scripting (XSS) vulnerability in system/src/Grav/Common/Twig/Twig.php. The flaw occurs at lines 355 and 358, where unfiltered user input from PATH_INFO is passed into the $error_msg variable and rendered in the server response when an exception is generated. An attacker can trigger this by accessing /admin/tools/someunexistingpage with a crafted path segment [1][4].

Exploitation

An unauthenticated remote attacker can exploit this vulnerability by crafting a URL containing malicious JavaScript in the PATH_INFO segment. The attacker needs no authentication nor special network position, only the ability to trick a logged-in administrator into visiting the crafted link. For example, visiting /admin/tools/a--%3E%3Cimg%20src=x%20onerror=alert(1)%3E causes the alert(1) script to execute in the context of the victim's browser [1][4]. More advanced proofs of concept demonstrate capturing the admin's nonce and changing their password to achieve privilege escalation [4].

Impact

Successful exploitation allows an attacker to execute arbitrary web script or HTML in the administrative session of a logged-in Grav admin user. Since the vulnerability is in the admin plugin, the attacker can gain access to sensitive information (e.g., nonces) and perform administrative actions such as changing passwords, leading to full site compromise. The CVSS v3.0 score is 7.4 (High) with vector CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N, indicating high confidentiality impact and no availability impact [3].

Mitigation

The vulnerability is fixed in Grav CMS version 1.3.0. Users should upgrade immediately. There is no known workaround for unpatched versions. The CVE is not listed in CISA's Known Exploited Vulnerabilities (KEV) catalog as of the publication date.

AI Insight generated on May 22, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
getgrav/gravPackagist
< 1.3.01.3.0

Affected products

1

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

5

News mentions

0

No linked articles in our index yet.