Pebble Templates Arbitrary File Inclusion Vulnerability via Include Tag

Vulnerability

A vulnerability allowing arbitrary local file inclusion has been identified in all versions of the Pebble templating engine, specifically through the use of the include tag. This issue arises because the include tag can be exploited to access sensitive local files, such as /etc/passwd or /proc/1/environ. The vulnerability requires a high-privileged attacker who can create malicious notification templates that leverage the include tag to access these files.

Impact

Exploitation of this vulnerability allows for arbitrary file inclusion, with the potential to access sensitive system files.

Reproduction

To reproduce this vulnerability, create a Pebble template that includes the include tag with a path to a sensitive file, such as /etc/passwd. This can be done using the PebbleEngine's getLiteralTemplate method, which processes the template string and evaluates it with the included file path.

Remediation

This vulnerability can be mitigated by disabling the include macro in Pebble Templates. This can be done by creating a new PebbleEngine instance and registering an extension customizer that disallows the include tag.

Added: Jun 9, 2025, 7:46 PM
Updated: Jun 9, 2025, 7:46 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
2.5
exploitability
6.1
remediation
0.0
relevance
0.0
threat
6.4
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.