The Daily Byte
Breaking
Welcome to The Daily Byte — real stories from across Pakistan.
Monday, 23 November 2026 · Pakistan

The Daily Byte

Stories from Pakistan that deserve to be heard

CVE-2026-130741: Grav Twig Flaw Exposes Server Files

By The Daily Byte ·22 Nov 2026 ·3 min read
Lines of programming code on a computer screen, representative of the Grav CMS code

A flaw in the Grav content management system lets a user with publishing rights read any file on the server, including private keys and the secret used to sign API tokens. The flaw, tracked as CVE-2026-130741, was published on 18 November 2026 and the CVE record was updated on 21 November. It carries a severity score of 8.7 out of 10.

Grav is an open-source, file-based content management system. The vulnerability affects Grav versions from 2.0.0 up to, but not including, 2.2.18. The fix is to update to Grav 2.2.18, which the project’s maintainers released alongside their security advisory.

How the flaw works

The problem sits in Grav’s Twig templating sandbox. According to the CVE record, the flaw lets publishers read any server file by abusing an allowlisted function, array_key_value(), and page accessor setters such as filePath(). In plain terms, a part of the template system that was supposed to be fenced off can be used to reach files outside the content the publisher is meant to touch.

The record says an attacker who can do that can repoint page objects or overwrite the collections of assets a page uses, so that private keys and the API signing secret are rendered in a page the attacker can read. With the signing secret in hand, the attacker can forge a super-admin API token, effectively promoting a low-privilege publishing account to full administrative control of the site.

The attack needs a publisher account, so it is not open to anonymous visitors: the CVE record rates the privileges required as low, the attack complexity as low, and the attack vector as network. But any site that lets outside contributors, contractors or community members publish content has the accounts this flaw needs.

What site owners should do

Site owners running Grav should check their version and update to 2.2.18 or later. The maintainers published their own advisory on GitHub, and the CVE record points to it as the vendor advisory. Until the update is applied, administrators should review who holds publishing rights and remove accounts that do not need them.

No exploitation in the wild has been reported for this flaw. That is not a reason to wait: flaws in content management systems are routinely probed once their details are public, and this one is documented in enough detail for an attacker to reproduce.

The CVE is classed as an exposure of sensitive information, and the record gives it a CVSS 4.0 score of 8.7 and a CVSS 3.1 score of 8.8, both in the high range. The scores reflect the combination of a low-privilege starting point and a high-impact outcome: a publishing account that can read the server’s secrets can become an administrator.