CVE-2026-130735: Grav 2.0.0 before 2.2.18 Twig Injection via Media Metadata and File Names

Published Nov 18, 2026
·
Updated

Grav from 2.0.0 before 2.2.18 contains a Twig injection vulnerability that allows media-only accounts and anonymous uploaders to execute Twig by placing delimiters in image titles, alt text, class, id, or file names. Attackers can combine injected Twig with the autoescape tag to serve script to every page visitor, including super admins, or expose unpublished page content.

Affected Software

1 affected component
Grav Grav>=2.0.0<2.2.18

Event History

Nov 18, 2026
CVE Published
via MITRE·11:34 AM
Data Sourced
via MITRE·11:34 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·12:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Who can exploit this vulnerability?

Media-only accounts can exploit it, and anonymous users can do so where anonymous uploads are enabled. An attacker does not need an authenticated account if anonymous uploading is available.

2

Which inputs should be treated as dangerous?

Image titles, alt text, class attributes, id attributes, and file names can carry Twig delimiters that trigger the injection. Media upload and metadata-editing workflows are therefore relevant exposure points.

3

What could an attacker achieve?

An attacker can execute Twig and can combine it with the autoescape tag to serve script to every page visitor, including super admins. The issue can also expose unpublished page content.

4

Are default installations affected?

The provided information identifies affected versions as Grav 2.0.0 before 2.2.18, but does not state whether anonymous uploads or media-only accounts are enabled by default. Exposure depends on whether attackers can upload media or control its metadata or file names.

5

How can I determine whether my instance is affected?

Check whether the Grav version is 2.0.0 through versions before 2.2.18, and review whether untrusted users can upload media or edit image metadata and file names. Inspect existing media titles, alt text, class, id, and filenames for Twig delimiter content.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203