Aug 22, 2026·6 min read·26 visits
Unleash mutated a global mustache instance, permanently disabling HTML escaping process-wide after any markdown formatting event.
Prior to version 8.0.3, Unleash's Markdown event formatter directly mutated the global template-escaping function of the shared mustache Node.js module, resulting in a process-wide security degradation where HTML/Markdown escaping was permanently disabled for the application lifetime.
CVE-2026-63466 is a process-wide security degradation vulnerability in the open-source feature management platform Unleash. The flaw is located within the Markdown event formatter module, specifically inside the file src/lib/addons/feature-event-formatter-md.ts. This component is responsible for translating system events, such as feature flag updates or configuration changes, into structured Markdown format for outbound communication.\n\nOutbound communication channels like integrations with Slack, Microsoft Teams, email alert services, and webhooks rely on this formatter to present readable system summaries. The attack surface is exposed to users who possess credentials sufficient to trigger platform events or mutate user-specific fields, such as Editor-level roles. By generating formatted messages, the formatter interacts with third-party messaging APIs.\n\nAn attacker capable of triggering these formatting actions can permanently lower the security posture of the entire application process. This occurs because the system disables output escaping for all subsequently rendered templates, regardless of the target channel or module. Consequently, downstream security controls that prevent injection attacks are systematically deactivated across the entire runtime.
The root cause of this vulnerability lies in the interaction between the Node.js module caching system and the configuration of the third-party mustache template rendering library. In Node.js, the module system resolves dependency imports by caching the evaluated module after the initial load. When subsequent files import the same package, Node.js returns a reference to this singleton instance.\n\nInside the vulnerable class FeatureEventFormatterMd, the application imports the global Mustache singleton. To output unescaped characters in Markdown formatting (such as preserving brackets and asterisks), the developers modified the global escape function by assigning Mustache.escape = (text) => text; directly to the imported object. This assignment modifies the shared state of the cached module rather than configuring a localized rendering context.\n\nBecause the mustache module reference is shared process-wide, this modification alters the behavior of all template-rendering actions executed by other components in the runtime. Modules such as email-service.ts or webhook.ts that import mustache will subsequently execute their render calls without any HTML or string escaping. The vulnerability remains active until the entire Node.js runtime process is restarted.
The vulnerable code path is situated in src/lib/addons/feature-event-formatter-md.ts. In versions prior to 8.0.3, the formatting method directly rewrites the global escaping property on the imported module.\n\ntypescript\n// Vulnerable Implementation (Before v8.0.3)\nimport Mustache from 'mustache';\n\nexport class FeatureEventFormatterMd implements FeatureEventFormatter {\n format(action, context, path) {\n // ... formatting logic ...\n\n // Overwriting the global escape handler on the cached singleton\n Mustache.escape = (text) => text;\n\n const text = Mustache.render(action, context);\n const url = path\n ? `${this.unleashUrl}${Mustache.render(path, context)}`\n : undefined;\n\n return { text, url };\n }\n}\n\n\nThe patch introduced in version 8.0.3 addresses this by completely removing the assignment to the global Mustache.escape property. Instead, the patch uses local rendering options that are confined exclusively to the active call stack.\n\ntypescript\n// Patched Implementation (v8.0.3)\nimport Mustache from 'mustache';\n\nexport class FeatureEventFormatterMd implements FeatureEventFormatter {\n format(action, context, path) {\n // ... formatting logic ...\n\n // Localized escape configuration passed to Mustache.render\n const renderContext = { escape: (text: string) => text };\n\n const text = Mustache.render(action, context, undefined, renderContext);\n const url = path\n ? `${this.unleashUrl}${Mustache.render(path, context, undefined, renderContext)}`\n : undefined;\n\n return { text, url };\n }\n}\n\n\nThis remediation ensures that the default escaping behavior is preserved globally. The custom escaping callback is executed solely within the scope of the localized Mustache.render call, preventing process-wide state pollution. This fix is technically complete, as it removes the global side effects without affecting the necessary markdown formatting functionality.
To exploit this vulnerability, an attacker must have an account with privileges to alter user metadata and trigger feature flag events, such as an Editor-level profile. The attack sequence begins when the attacker modifies their own username or email attribute to contain system-specific integration markdown or payload structures. For example, a Slack-specific link-injection payload such as admin <http://malicious-phishing-domain.com|Verify Account> is set as the user's display name.\n\nNext, the attacker triggers an action that generates an audit event, such as enabling or disabling a feature flag. This event causes the system to call FeatureEventFormatterMd.format(). As the formatting function executes, it runs the global assignment Mustache.escape = (text) => text; which deactivates template escaping globally.\n\nThe unescaped markdown block is then transmitted to the outbound Slack or Teams integration, where the platform parses the injected link and displays a phishing hyperlink. Concurrently, because the global escape handler is now disabled, any subsequent outbound communication, such as user password reset emails, will execute without escaping. This enables secondary stored cross-site scripting or HTML injection attacks against administrators or users who view system-generated emails.\n\nmermaid\ngraph LR\n A["Attacker with Editor Role"] -->|"1. Injects payload into User Profile"| B["Unleash Database"]\n A -->|"2. Triggers Feature Flag Event"| C["FeatureEventFormatterMd"]\n C -->|"3. Overwrites Mustache.escape globally"| D["Cached Mustache Singleton"]\n C -->|"4. Sends unescaped notification"| E["Slack / Teams Integration"]\n F["Email Service / Webhooks"] -->|"5. Renders templates without escaping"| D\n F -->|"6. Sends unescaped HTML email"| G["Victim Admin Inbox"]\n
The primary impact of this vulnerability is process-wide security degradation leading to downstream integrity and validation failures. While categorized with a CVSS score of 4.1 (Medium Severity) due to the requirement for Editor-level privileges, the actual impact is systemic. The vulnerability modifies the behavior of the active Node.js server instance until a process recycle occurs.\n\nAn attacker can leverage the global disablement of HTML escaping to target downstream communication channels. In email systems, this permits the injection of arbitrary HTML tags, facilitating highly convincing spearphishing campaigns that appear to originate from the trusted application server. In administrative logging endpoints or webhooks, it enables the injection of control characters and structured format blocks.\n\nThe scope modification is confirmed via the CVSS vector CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:N/I:L/A:N. Because the compromise of the Unleash application state results in security controls failing in external, downstream systems (such as email clients and chat platforms), the Scope (S) parameter is designated as Changed.
The recommended remediation path is to upgrade Unleash to version 8.0.3 or higher. This update replaces the global module modification with scoped render configuration options, eliminating the process-wide security degradation. Organizations deploying Unleash via Docker must update their target images to unleash-org/unleash:8.0.3 or later.\n\nIn scenarios where immediate patching is not possible, system administrators can mitigate risk by implementing strict API-level input validation at the reverse proxy or application firewall layer. Specifically, input validation rules should be configured to reject username updates containing control characters associated with markdown or HTML, such as <, >, |, [, ], (, and ).\n\nAdditionally, implementing regular process recycling or health-check based restarts can limit the persistence of the vulnerability. Since the global modification to the mustache library exists purely in runtime memory, a container restart restores the secure escaping defaults until the vulnerable path is triggered again.
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:N/I:L/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
Unleash Core & Enterprise Backend Unleash | < 8.0.3 | 8.0.3 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-116 / CWE-1188 |
| Attack Vector | Network |
| CVSS Score | 4.1 |
| EPSS Score | N/A |
| Impact | Process-wide HTML/Markdown escaping bypass |
| Exploit Status | None |
| KEV Status | Not Listed |
The software does not properly encode or escape output, allowing it to be interpreted as active content by downstream components.
CVE-2026-126297 (GHSA-v8f3-6phw-6mh9) is an uncontrolled resource consumption and algorithmic complexity vulnerability in the Natural Language Toolkit (NLTK) prior to version 3.10.4. Located in the Semantic Role Labeling (SRL) parser within `nltk/corpus/reader/conll.py`, the flaw allows an attacker to trigger quadratic O(N^2) CPU processing overhead by providing crafted CoNLL-formatted corpus inputs containing decoy span columns or nested full-width verb spans. Applications parsing untrusted linguistic corpora can experience prolonged CPU exhaustion and application-level Denial of Service (DoS).
CVE-2026-126298 (also tracked as GHSA-r53h-rw34-8h97) is an algorithmic complexity Denial of Service (DoS) vulnerability in the Natural Language Toolkit (NLTK) Python library affecting all versions prior to 3.10.4. The vulnerability resides in the nltk.tree.transforms.chomsky_normal_form function and its corresponding public method Tree.chomsky_normal_form(). When transforming a parse tree into Chomsky Normal Form using the default right-factoring strategy, the function repeatedly invokes list.pop(0) inside a loop iterating over all children of a node. In CPython, removing the initial element of a standard list requires an O(N) memory shift operation, causing the overall binarization algorithm to degrade to O(N^2) quadratic time complexity relative to the width of a node. Furthermore, converting horizontal node width into vertical tree depth bypasses initial parsing depth bounds, triggering subsequent stack exhaustion (RecursionError) when recursive methods traverse the mutated structure. Unauthenticated remote attackers who can submit bracketed tree strings to applications invoking this transformation can exhaust single-threaded CPU resources or induce unhandled application exceptions.
An algorithmic complexity vulnerability (CWE-407) in the Natural Language Toolkit (NLTK) before version 3.10.4 allows remote unauthenticated attackers to cause a denial of service via crafted Combinatory Categorial Grammar (CCG) lexicon strings. The parser in nltk.ccg.lexicon.fromstring performs repeated immutable string slicing, concatenation, and regex tail capturing, resulting in O(n^2) CPU consumption when processing wide, flat category definitions.
CVE-2026-126295 (also tracked as GHSA-fg9w-wfp5-j933) is a path confinement bypass vulnerability in the Natural Language Toolkit (NLTK) affecting versions 3.10.0 prior to 3.10.4. The flaw resides in nltk/parse/bllip.py within the BllipParser class and its factory method BllipParser.from_unified_model_dir(). Unlike sibling tool wrappers in NLTK that enforce data-root confinement via the nltk.pathsec module, BllipParser passes caller-supplied filesystem paths directly into the third-party bllipparser native C extension without validation. When an application passes untrusted input as model paths or directories to BllipParser, an attacker can force the native extension to open arbitrary files on the local filesystem. This leads to information disclosure through parser diagnostic oracles, local model tampering via shared directories, and denial of service by hanging worker threads on blocking special files (such as FIFOs or device nodes) or exhausting memory via oversized files.
CVE-2026-126300 (GHSA-ffr9-mgrr-wcvr) is an inefficient algorithmic complexity vulnerability (CWE-407) in the Natural Language Toolkit (NLTK) Python library affecting versions 3.2.5 prior to 3.10.4. The flaw resides in the quote-restoration routine of TreebankWordTokenizer.span_tokenize and NLTKWordTokenizer.span_tokenize, where repeated calls to list.pop(0) over matched quote tokens introduce quadratic O(n^2) time complexity. An unauthenticated remote attacker who supplies input containing long sequences of double-quote characters can exhaust CPU resources and degrade service availability.
The Natural Language Toolkit (NLTK) versions 3.6 through 3.10.3 contain an algorithmic complexity vulnerability in the LegalitySyllableTokenizer.tokenize method. When processing tokens composed of continuous runs of vowels, an unguarded string reversal and set membership lookup loop executes in quadratic time relative to the input token length. Remote attackers capable of submitting arbitrary text to applications utilizing this tokenizer can trigger sustained single-core CPU exhaustion and application-level denial of service.