Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. getgrav/grav
  4. ›
  5. CVE-2026-72701

CVE-2026-72701: Grav: Non constant time nonce comparison in Utils::verifyNonce() used for CSRF protection

September 17, 2026

Grav\Common\Utils::verifyNonce(), the core function Grav and its plugins use to validate CSRF nonces, compares the submitted nonce to the expected value with PHP’s === operator instead of hash_equals(). === on strings short circuits at the first differing byte, so the comparison time leaks how many leading bytes of a guess are correct. This is CWE-208, Observable Timing Discrepancy.

The codebase already knows to avoid this pattern. hash_equals() is used for the equivalent purpose in four other places I found: system/src/Grav/Common/Session.php, system/src/Grav/Framework/Cache/Adapter/FileCache.php, system/src/Grav/Common/Scheduler/Scheduler.php (the webhook token check), and system/src/Grav/Common/Scheduler/JobQueue.php. Utils::verifyNonce() is the one place I found that still uses a plain equality check for a secret comparison.

References

  • github.com/advisories/GHSA-38p6-h87p-r4cg
  • github.com/getgrav/grav/security/advisories/GHSA-38p6-h87p-r4cg
  • nvd.nist.gov/vuln/detail/CVE-2026-72701
  • www.vulncheck.com/advisories/grav-cms-before-timing-attack-via-verifynonce

Code Behaviors & Features

Detect and mitigate CVE-2026-72701 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 2.0.16

Fixed versions

  • 2.0.16

Solution

Upgrade to version 2.0.16 or above.

Impact 3.7 LOW

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

Learn more about CVSS

Weakness

  • CWE-208: Observable Timing Discrepancy

Source file

packagist/getgrav/grav/CVE-2026-72701.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 22 Sep 2026 12:20:31 +0000.