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 (updated October 26, 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/commit/a076b9073abc51c1df924529d65773e44950c5c4
  • github.com/getgrav/grav/releases/tag/2.0.16
  • 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. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

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 Sun, 08 Nov 2026 00:16:20 +0000.