CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-59989

CVE-2026-59989: Remote Code Execution via Server-Side Template Injection in Phalcon Volt Engine

Amit Schendel
Amit Schendel
Senior Security Researcher

Aug 22, 2026·5 min read·133 visits

Executive Summary (TL;DR)

Phalcon Volt template engine directly concatenates raw AST tokens in the 'join' filter, allowing remote code execution if template contents are user-controlled.

A critical server-side template injection (SSTI) vulnerability exists in the Volt template engine of the Phalcon PHP framework. In versions 5.15.0 and earlier, raw AST token values for filter arguments in the 'join' filter are directly spliced into the generated PHP template code. This allows an attacker who can influence Volt templates to execute arbitrary PHP code during template rendering.

Vulnerability Overview

The Phalcon framework is a high-performance PHP framework delivered as a C extension. Its native templating engine, Volt, compiles twig-like syntax into raw PHP files that are subsequently cached and executed on the web server. This design yields high performance but demands strict isolation and validation during the compilation phase to prevent injection of malicious PHP statements.\n\nUnder normal operations, the Volt compiler parses structural components and routes variables or literals through a unified expression evaluation system. This security layer ensures that strings are correctly escaped and variable boundaries are preserved in the generated PHP source. The vulnerability in the compiler's handling of specific filter expressions represents a breakdown of this containment layer.\n\nThis specific security flaw is categorized as a server-side template injection (SSTI) vulnerability, tracked under CWE-94 (Improper Control of Generation of Code) and CWE-1336 (Improper Neutralization of Special Elements in a Template Engine). The flaw allows an attacker to bypass language safety boundaries when template contents or filter parameters can be manipulated.

Root Cause Analysis

The vulnerability is situated within the filter resolving logic of the Volt compiler class, located in phalcon/Mvc/View/Engine/Volt/Compiler.zep. During the translation of Volt templates to PHP code, the resolveFilter method processes individual filters applied to variables. When the compiler processes the join filter, it maps the template operation to the native PHP join() function.\n\nIn versions 5.15.0 and earlier, the compiler extracts the raw token representation of the separator and operand arguments without routing them through the standard expression compilation pipeline. Instead of processing the AST nodes recursively via the safe expression evaluator, the engine extracts the raw string value of the arguments directly using funcArguments[1]['expr']['value'] and concatenates them within single-quoted string boundaries.\n\nThis direct concatenation pattern assumes that the input token values are safe string literals. Because the compiler does not validate or escape single quotes present within these raw tokens, any single quote in the input string terminates the compiled string literal context prematurely. This enables raw PHP statement injection into the resulting cached template file.

Code Analysis

The following code diff displays the exact block modified in phalcon/Mvc/View/Engine/Volt/Compiler.zep to resolve the vulnerability. Note how the insecure concatenation is replaced with structured expression resolution.\n\ndiff\n@@ -2542,8 +2542,8 @@ class Compiler implements InjectionAwareInterface\n case \"format\":\n return \"sprintf(\" . arguments . \")\";\n case \"join\":\n- return \"join('\" . funcArguments[1][\"expr\"][\"value\"]\n- . \"', \" . funcArguments[0][\"expr\"][\"value\"] . \")\";\n+ return \"join(\" . this->expression(funcArguments[1][\"expr\"])\n+ . \", \" . this->expression(funcArguments[0][\"expr\"]) . \")\";\n case \"json_encode\":\n return \"json_encode(\" . arguments . \")\";\n\n\nIn the vulnerable implementation, the compiler evaluates funcArguments[1]['expr']['value'] and outputs it directly. This bypasses this->expression(), which is responsible for safely serializing types and escaping literals. In the patched implementation, both arguments are handled by this->expression(), generating valid, isolated, and properly escaped PHP expressions regardless of character payload contents.\n\nmermaid\ngraph LR\n A[\"Volt Template Input\"] --> B[\"Lexer & Parser AST\"]\n B --> C[\"Compiler: resolveFilter('join')\"]\n C --> D[\"Vulnerable: Direct String Splicing\"]\n C --> E[\"Patched: this->expression() Validation\"]\n D --> F[\"Insecure Cache File with PHP Payloads\"]\n E --> G[\"Secure PHP Cache with Escaped Literals\"]\n

Exploitation Methodology

Exploitation of this vulnerability requires that an attacker can control the template source code or manipulate parameters that are compiled inline. This environment is common in multi-tenant content management systems, blogging platforms, or dashboard systems that permit users to customize layouts or filter styles dynamically using template configurations.\n\nWhen a user-controlled parameter is passed directly as the separator argument inside a template (e.g., {{ items | join(user_input) }}), the compiler processes the argument. An attacker can set the value of the separator parameter to a payload designed to escape the single-quote enclosure. A typical payload contains a closing single quote, a closing parenthesis, a semicolon to terminate the native instruction, the arbitrary payload commands, and a PHP comment initiator.\n\nUpon processing, the compiler places this payload directly into the target PHP template cache on disk. When the page is subsequently loaded or rendered via Phalcon\\Mvc\\View\\Engine\\Volt::render(), the server executes the generated PHP file. The injected payload executes within the security context of the parent web server process, leading to command execution or local file manipulation.

Impact Assessment

The security impact of CVE-2026-59989 is classified as critical. Successful exploitation results in arbitrary PHP code execution on the hosting infrastructure, which compromises confidentiality, integrity, and availability of the web application and underlying resources.\n\nThe vulnerability does not require authentication to trigger if the target application exposes custom template rendering features to unauthenticated users. Since the resulting injected code is cached on disk, the execution is persistent until the cache is cleared or overwritten. Attackers can leverage this position to read environment variables, access databases, or deploy persistent backdoors.\n\nThe CVSS v4.0 score is rated at 9.2 (Critical) with the vector CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N. Although the vulnerability requires specific configuration conditions (dynamic template compilation under user influence), the severity of post-exploitation outcomes warrants immediate remediation.

Detection and Remediation

Remediation requires upgrading Phalcon to version 5.16.0 or higher. This update replaces the direct AST interpolation with the safer compiler pipelines. Organizations should verify their current Phalcon extension version via the command line or phpinfo() outputs.\n\nIf upgrading is not immediately possible, code audits must be performed to ensure no template strings are dynamically generated using unsanitized user inputs. Developers must avoid patterns where variables are interpolated into Volt source strings before compile time. The template code must remain static, and variable data should be passed solely via standard context parameters.\n\nAdditionally, file system permissions on compiled template directories should be restricted. Although the web server process requires write access to create the PHP cache files, segregating these directories and monitoring them for unexpected changes or the inclusion of suspicious PHP functions (such as system, exec, or eval) can serve as an effective detective control.

Official Patches

PhalconFix join Volt filter parameter compilation

Fix Analysis (1)

Technical Appendix

CVSS Score
9.2/ 10
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Affected Systems

Phalcon Framework (phalcon/cphalcon)

Affected Versions Detail

Product
Affected Versions
Fixed Version
cphalcon
Phalcon
<= 5.15.05.16.0
AttributeDetail
CWE IDCWE-94, CWE-1336
Attack VectorNetwork (AV:N)
CVSS v4.0 Score9.2 (Critical)
Exploit StatusPoC (Proof of Concept)
KEV StatusNot Listed
Affected ComponentVolt Template Compiler (join filter)

MITRE ATT&CK Mapping

T1059Command and Scripting Interpreter
Execution
T1203Exploitation for Client Execution
Execution
CWE-94
Improper Control of Generation of Code ('Code Injection')

The application handles templates in a way that allows an attacker to inject source code which is later executed on the server.

References & Sources

  • [1]GitHub Security Advisory GHSA-hrwp-4hh9-c8r8
  • [2]GitHub Pull Request 17217
  • [3]Fix Commit e434061be3b7161930476c1368c868badc71e1bd
  • [4]Phalcon Release Tag 5.16.0

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•25 minutes ago•CVE-2026-126299
7.5

CVE-2026-126299: Quadratic Algorithmic Complexity Denial of Service in NLTK CCG Lexicon Parser

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.

Alon Barad
Alon Barad
1 views•10 min read
•about 1 hour ago•CVE-2026-126295
7.1

CVE-2026-126295: Path Traversal and Unconfined File Access in NLTK BllipParser

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.

Amit Schendel
Amit Schendel
2 views•11 min read
•about 2 hours ago•CVE-2026-126300
5.3

CVE-2026-126300: Algorithmic Complexity Denial of Service in NLTK TreebankWordTokenizer.span_tokenize

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.

Amit Schendel
Amit Schendel
3 views•10 min read
•about 3 hours ago•GHSA-GPWC-27CW-RH9R
5.3

CVE-2026-126301: Quadratic CPU Exhaustion in NLTK LegalitySyllableTokenizer

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.

Amit Schendel
Amit Schendel
4 views•10 min read
•about 4 hours ago•CVE-2026-126304
8.7

CVE-2026-126304: Symlink Path Traversal in NLTK YCOECorpusReader

CVE-2026-126304 is a symlink path traversal vulnerability (CWE-59) in the Natural Language Toolkit (NLTK) versions 3.10.0 prior to 3.10.4. The YCOECorpusReader class constructs internal sub-readers for the 'psd' and 'pos' subdirectories using FileSystemPathPointer.join(), which relies exclusively on lexical string-prefix validation rather than canonical path resolution. An attacker who supplies a crafted YCOE corpus containing symbolic links in place of the 'psd' or 'pos' subdirectories can bypass directory confinement and read arbitrary files from sibling corpora or sensitive directories within the NLTK data sandbox.

Amit Schendel
Amit Schendel
6 views•9 min read
•about 5 hours ago•CVE-2026-128077
6.5

CVE-2026-128077: Authorization Bypass via Request Path Desynchronization in Nuxt and @nuxt/nitro-server

CVE-2026-128077 (GHSA-r99w-jh2x-3mg9) is an authorization bypass and interpretation conflict vulnerability affecting Nuxt and its underlying @nuxt/nitro-server package in versions 4.6.0 through 4.6.3. When an incoming HTTP request path begins with a double forward slash (e.g., //x/admin), the WHATWG URL parser within the Nuxt server-side page renderer interprets the initial segment as a network host/authority and resolves the remaining path (/admin) against the application's page router. Because Nitro server middleware, route-scoped serverHandlers, and Nitro routeRules evaluate the unparsed request path (//x/admin), path-based access controls, redirects, and security header policies configured for /admin fail to match and are bypassed.

Amit Schendel
Amit Schendel
5 views•10 min read