SCA: security update for getgrav/grav (GHSA-96xv-rmwj-6p9w)

high Tenable Cloud Security Plugin ID 413087

Description

There are packages installed that are affected by a vulnerability referenced in the following CVE:

- Grav is a flat-file content management system. Prior to version 1.7.42, there is a logic flaw in the
`GravExtension.filterFilter()` function whereby validation against a denylist of unsafe functions is only
performed when the argument passed to filter is a string. However, passing an array as a callable argument
allows the validation check to be skipped. Consequently, a low privileged attacker with login access to
Grav Admin panel and page creation/update permissions is able to inject malicious templates to obtain
remote code execution. The vulnerability can be found in the `GravExtension.filterFilter()` function
declared in `/system/src/Grav/Common/Twig/Extension/GravExtension.php`. Version 1.7.42 contains a patch
for this issue. End users should also ensure that `twig.undefined_functions` and `twig.undefined_filters`
properties in `/path/to/webroot/system/config/system.yaml` configuration file are set to `false` to
disallow Twig from treating undefined filters/functions as PHP functions and executing them.
(CVE-2023-34252)

See Also

https://github.com/advisories/GHSA-96xv-rmwj-6p9w

Plugin Details

Severity: High

ID: 413087

Version: Revision 1.7

Type: Local

Family: SCA Checks

Published: 1/23/2025

Updated: 7/2/2026

Supported Sensors: Tenable Cloud Security, Tenable Self-Hosted Container Security

Risk Information

VPR

Risk Factor: Medium

Score: 4.9

Percentile: 57.58

Vendor

Vendor Severity: High

CVSS v2

Risk Factor: High

Base Score: 8.3

Temporal Score: 6.5

Vector: CVSS2#AV:N/AC:L/Au:M/C:C/I:C/A:C

CVSS Score Source: CVE-2023-34252

CVSS v3

Risk Factor: High

Base Score: 7.2

Temporal Score: 6.5

Vector: CVSS:3.0/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H

Temporal Vector: CVSS:3.0/E:P/RL:O/RC:C

Vulnerability Information

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 6/16/2023

Vulnerability Publication Date: 6/14/2023

Reference Information

CVE: CVE-2023-34252