Skip to main content

drupal-pattern-lab/unified-twig-extensions CVE-2025-11570

LOW
Cross-site Scripting (XSS) (CWE-79)
2025-10-10 report@snyk.io
1.9
CVSS 4.0 · Vendor: snyk
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate to Pattern Lab
  2. Delivery
    Craft malicious payload in template
  3. Exploit
    Pass payload to link function
  4. Execution
    Function renders unescaped HTML
  5. Persist
    Browser executes injected JavaScript
  6. Impact
    Attacker 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.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
No patch listed yet 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

composer drupal-pattern-lab/unified-twig-extensions no fix

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

Vendor (snyk) PRIMARY 1.9 LOW
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

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
Active
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
Low
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

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

EPSS Score
0.0%
Top 94% exploitable
Data Quality
5 sources
Confidence: Medium

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.

SignalValue
Severity LOW
CISA KEV No
Public POC No
EPSS 0.0%
Patch available No
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Low

Priority Score

10
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +10
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy