Skip to main content
VulnerabilityPublished Updated

getgrav/grav · Duplicate Advisory: Grav: Non constant time nonce comparison in Utils::verifyNonce() used for CSRF protection

Affects getgrav/gravSource GCVE Database

0

CVSS 3.7 Low · fixed in 2.0.16 : update getgrav/grav when convenient.

Data as of 18 Sep 2026, 01:28 UTC

CVSS 3.1 base score
3.7Low
How severe the flaw is on the 0–10 CVSS scale.
Patch
Available – fixed in 2.0.16
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N

What to do

Affected software

ProductAffectedFixed in
Packagistgetgrav/gravAffected–Fixed in–

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

A fix is available in Grav CMS version 2.0.16 and later, which replaces the non-constant-time comparison with a constant-time function for nonce verification. Users should upgrade to version 2.0.16 or later to remediate this vulnerability. Since this advisory is a duplicate, refer to the original advisory GHSA-38p6-h87p-r4cg for detailed remediation instructions.

Description

Grav CMS versions before 2.0.16 have a timing vulnerability in the Utils::verifyNonce() function used for CSRF protection. The vulnerability arises because the nonce comparison uses a non-constant-time string comparison operator (===) instead of a constant-time function like hash_equals(). This allows attackers to measure timing differences in responses to recover valid nonce values byte-by-byte, weakening the effectiveness of CSRF protection.

References

Community reviews

Loading reviews…