Junglewise Threat Intelligence

CVE-2026-59989: Phalcon Volt template engine code injection via join filter

CVE-2026-59989 · Severity: critical · CVSS 9.2 · Published 2026-08-21

Executive brief

Phalcon's Volt template engine has a critical flaw in how it handles the `join` filter—it fails to properly escape user-supplied arguments when generating PHP code. An attacker who can control Volt template content can inject arbitrary PHP code that executes when the template is compiled and cached, leading to complete system compromise in the web server process.

Technical details

The vulnerability is a server-side template injection (SSTI) leading to remote code execution in the Volt template compiler (Phalcon\Mvc\View\Engine\Volt\Compiler). The root cause lies in lines 2544–2546 of `Compiler.zep`, where the `join` filter implementation concatenates the separator and array arguments directly into generated PHP code without any escaping or neutralization. Unlike other filters, the join filter does not route its arguments through the `expression()` method; instead, it splices raw template-literal bytes verbatim between single quotes for the separator and completely bare for the array parameter. An attacker can inject single quotes or other PHP metacharacters to break out of the generated `join('...')` call and execute arbitrary PHP. The compiled template is written to a cache file and required by the render() method at runtime, so injected code executes with full web-server privileges. No authentication or user interaction is required—only the ability to control Volt template source (e.g., via database-driven templates, user-supplied template names, or configuration files).

Affected products

  • Phalcon Phalcon (cphalcon) <= 5.15.0

Timeline

  • 2026-07-10: disclosed: Published to Phalcon security advisory database
  • 2026-05-16: patched: Fixed in Phalcon 5.16.0 (commit e434061)
  • 2026-08-21: advisory: Published to GitHub Advisory Database

References

Related threats