Drupal Pattern Lab Unified Twig Extensions, Cross-site Scripting, CVE-2025-22094 (Low)

Listen to this Post

The CVE-2025-22094 vulnerability exists within the `drupal-pattern-lab/unified-twig-extensions` package. The flaw is a Cross-site Scripting (XSS) issue caused by insufficient input filtering and output escaping in a Twig extension function. This function is designed to format text and is shared for use in both Drupal and Pattern Lab environments. When user-supplied data containing malicious JavaScript is passed through this specific function, the code is not properly neutralized before being rendered in the final HTML output. An attacker could exploit this by tricking a user into interacting with crafted malicious input, leading to the execution of arbitrary scripts in the victim’s browser context. It is critical to note that this vulnerability is only exploitable when the package is used outside of the Drupal framework, as Drupal’s core text sanitization routines would otherwise prevent the attack.
Platform: Drupal/PHP
Version: <= 0.1.0
Vulnerability: XSS
Severity: Low

date: 2025-10-10

Prediction: Unpatched

What Undercode Say:

`composer show drupal-pattern-lab/unified-twig-extensions`

`./vendor/bin/twig < user_input.txt`

`echo “{{ malicious_function() }}” | pattern-lab`

How Exploit:

Malicious user input

Bypasses output escaping

Executes JavaScript

Protection from this CVE:

Use `drupal/unified_twig_ext`

Enable Drupal sanitization

Avoid unmaintained package

Impact:

Client-side code execution

Session hijacking potential

Limited exploit scope

🎯Let’s Practice Exploiting & Learn Patching For Free:

Sources:

Reported By: github.com
Extra Source Hub:
Undercode

🔐JOIN OUR CYBER WORLD [ CVE News • HackMonitor • UndercodeNews ]

💬 Whatsapp | 💬 Telegram

📢 Follow DailyCVE & Stay Tuned:

𝕏 formerly Twitter 🐦 | @ Threads | 🔗 Linkedin Featured Image

Scroll to Top