drupal-pattern-lab/unified-twig-extensions CVE-2025-11570
LOWAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate to Pattern Lab
-
DeliveryCraft malicious payload in template
-
ExploitPass payload to link function
-
ExecutionFunction renders unescaped HTML
-
PersistBrowser executes injected JavaScript
-
ImpactAttacker steals session/credentials
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires three specific conditions: (1) the drupal-pattern-lab/unified-twig-extensions package must be executed outside of Drupal (such as in Pattern Lab or a custom application that directly imports it), because Drupal's template system applies automatic output filtering that prevents exploitation; (2) the attacker must possess authenticated access to the system running the code; and (3) user interaction is required, meaning a user must view or interact with content containing the malicious payload. Exploitation is NOT possible within standard Drupal deployments using this package as originally intended, as Drupal's output filtering layer neutralizes unescaped input before rendering. |
| Impact | This vulnerability presents minimal real-world risk despite its XSS classification. The CVSS score of 1.9 reflects multiple limiting factors: authenticated access is required (PR:L), user interaction is necessary (UI:A), and impact is confined to low confidentiality and integrity with no availability impact. The EPSS score of 0.02% (6th percentile) indicates negligible exploitation probability in the wild. The critical constraint is the execution context - exploitation requires code to run outside Drupal, limiting exposure to Pattern Lab deployments or custom applications that directly import the package. The package's unmaintained status reduces attack surface as new installations are unlikely, though legacy deployments may remain vulnerable. The low CVSS vector combined with extremely low EPSS suggests this is a compliance/audit issue rather than an immediate operational threat, particularly for organizations using this code within standard Drupal deployments. |
| Exploit ScenarioDerived | An authenticated user with access to Pattern Lab (or a custom application using this package) crafts a template that passes a malicious script payload (e.g., '<img src=x onerror=alert(1)>') to the link function. The function renders this unescaped into the HTML output, causing the browser to execute the injected JavaScript. This scenario requires both authenticated access and the user's willingness to click a crafted link or have the XSS payload execute in a shared environment. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Apr 29, 2026
Cross-site scripting (XSS) in drupal-pattern-lab/unified-twig-extensions (all versions from 0.0.0) allows authenticated users to inject malicious scripts through insufficient output filtering, but only when the code is executed outside of Drupal environments such as Pattern Lab. The package is unmaintained; the vulnerability is fixed in the successor drupal/unified_twig_ext version 1.1.1. EPSS exploitation probability is extremely low at 0.02%, and no public exploit code has been identified.
RemediationAI
Primary remediation is to migrate from the unmaintained drupal-pattern-lab/unified-twig-extensions to drupal/unified_twig_ext version 1.1.1 or later, which includes the XSS fix. Update composer.json to require 'drupal/unified_twig_ext': '^1.1.1' and run composer update. For organizations unable to migrate immediately, restrict execution of this package to Drupal environments only, where automatic output filtering mitigates the vulnerability - avoid importing the package directly in Pattern Lab or standalone scripts. If the package must run outside Drupal, manually apply output escaping via Twig's |escape filter or PHP's htmlspecialchars() function to all user-controlled variables passed to the link function. Note that these workarounds add maintenance burden and should be treated as temporary measures only.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in composer
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The drupal-pattern-lab/unified-twig-extensions package provides shared Twig template functions intended for use in both Drupal and Pattern Lab environments. The vulnerability stems from CWE-79 (Improper Neutralization of Input During Web Page Generation) in the link.function.php file, where user-supplied data is rendered into HTML without proper escaping or sanitization. While Drupal's core templating system applies automatic output filtering via its theme system, the shared function lacks these safeguards when invoked directly in Pattern Lab or other non-Drupal contexts. The affected code path processes user input into HTML link elements without validating or escaping attribute values or text content.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/E:P
Primary rating from Vendor (snyk) · only source for this CVE.
CVSS VectorVendor: snyk
DescriptionCVE.org
Versions of the package drupal-pattern-lab/unified-twig-extensions from 0.0.0 are vulnerable to Cross-site Scripting (XSS) due to insufficient filtering of data. Note: This is exploitable only if the code is executed outside of Drupal; the function is intended to be shared between Drupal and Pattern Lab. The package drupal-pattern-lab/unified-twig-extensions is unmaintained, the fix for this issue exists in version 1.1.1 of drupal/unified_twig_ext
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
NVD
CVE.org
EPSS
GitHub
VulDB
Exploit-DB