CVE-2018-13818

Twig before 2.4.4 allows Server-Side Template Injection (SSTI) via the search search_key parameter

published July 10, 2018

CVSS
—
EPSS
7%
Percentile
94.1
In the wild
Unconfirmed
What it is

⚠️ A crafty little input could lead to devastating consequences! The search_key parameter in Twig before 2.4.4 opens the door to Server-Side Template Injection (SSTI). Think of it like a chef accepting any recipe without checking the ingredients — one wrong item could make the dish inedible or even dangerous! If an attacker feeds in malicious code via the search_key, they could manipulate the template engine in unexpected ways. This vulnerability means an attacker could potentially execute arbitrary code on the server, leading to unauthorized access or data leaks. It's like giving someone the ability to change the recipe in a restaurant without the chef's knowledge — chaos could ensue!

Put simply

Think of it like a chef accepting any recipe without checking the ingredients — one wrong item could make the dish inedible or even dangerous! If an attacker feeds in malicious code via the search_key, they could manipulate the template engine in unexpected ways. Twig versions prior to 2.4.4 are susceptible to SSTI through unvalidated input, allowing attackers to inject and execute code within the template environment.

What to do

This vulnerability means an attacker could potentially execute arbitrary code on the server, leading to unauthorized access or data leaks. It's like giving someone the ability to change the recipe in a restaurant without the chef's knowledge — chaos could ensue! Upgrade Twig to version 2.4.4 or later to close this security hole. Additionally, ensure all input to Twig is properly sanitized and validated to prevent unwanted code execution. Don't wait — secure your applications now! You've got this! Follow these steps, and you'll be on your way to making the internet a safer place! 🛡️

The record
Technical detail
CVSS
Not scored
CVSS v4.0
Not supplied
EPSS
0.06902 · 94.1th percentile
Published
2018-07-10T14:00Z
EPSS history
Timeline
  • 10 JUL 14:00Z
    Twig before 2.4.4 allows Server-Side Template Injection (SSTI) via the search search_key parameter
    cvelistv5