Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection') Affecting getgrav/grav package, versions >=2.0.0, <2.2.5


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.21% (11th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PHP-GETGRAVGRAV-21717124
  • published26 Oct 2026
  • disclosed22 Oct 2026
  • creditffasterss, shirabe0x05

Introduced: 22 Oct 2026

NewCVE-2026-114660  (opens in a new tab)
CWE-470  (opens in a new tab)

How to fix?

Upgrade getgrav/grav to version 2.2.5 or higher.

Overview

getgrav/grav is a Modern, Crazy Fast, Ridiculously Easy and Amazingly Powerful Flat-File CMS.

Affected versions of this package are vulnerable to Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection') via the dynamicFlexField method in FlexDirectory.php, where Flex form field directives embedded in page frontmatter are not restricted to safe operations. An authenticated attacker with edit access to a Flex object can supply arbitrary method names in page frontmatter directives, allowing them to invoke methods that modify or remove Flex objects, resulting in unauthorized data manipulation and potential partial data loss.

Note: This is only exploitable by a user who has been granted edit access to the targeted Flex object.

References

CVSS Base Scores

version 4.0
version 3.1