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

Source: https://junglewise.ai/threats/cve-2026-59989-phalcon-volt-template-engine-code-injection-via-join-filter  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-08-21. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

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

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.

Technologies: [phalcon/cphalcon (Packagist)](https://junglewise.ai/threats/technologies/phalcon-cphalcon). Vendors: [Packagist](https://junglewise.ai/threats/vendors/packagist).

## Quick answers

**Is CVE-2026-59989 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-59989 being exploited in the wild.

**How severe is CVE-2026-59989?** Critical severity, with a CVSS score of 4, published 21 August 2026.

**Which products and versions are affected?** phalcon/cphalcon (Packagist) <= 5.15.0, ECOSYSTEM:introduced=0,fixed=5.16.0.

**Is there a fix for CVE-2026-59989?** Yes. phalcon/cphalcon (Packagist): upgrade to 5.16.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-59989 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-59989?** Check whether you run phalcon/cphalcon (Packagist) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- phalcon/cphalcon (Packagist): upgrade to 5.16.0 or later

  ```sh
  composer require phalcon/cphalcon:^5.16.0
  ```


## 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

## Identifiers

- CVE-2026-59989
- GHSA-hrwp-4hh9-c8r8

## 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

- [https://api.github.com/users/nikkoenggaliano](https://api.github.com/users/nikkoenggaliano)
- [https://github.com/nikkoenggaliano](https://github.com/nikkoenggaliano)
- [https://api.github.com/users/nikkoenggaliano/gists%7B/gist_id%7D](https://api.github.com/users/nikkoenggaliano/gists%7B/gist_id%7D)
- [https://api.github.com/users/nikkoenggaliano/repos](https://api.github.com/users/nikkoenggaliano/repos)
- [https://avatars.githubusercontent.com/u/37658579?v=4](https://avatars.githubusercontent.com/u/37658579?v=4)
- [https://api.github.com/users/nikkoenggaliano/events%7B/privacy%7D](https://api.github.com/users/nikkoenggaliano/events%7B/privacy%7D)

## Related threats

- [Phalcon ReDoS in default MVC and CLI router patterns](https://junglewise.ai/threats/cve-2026-57584-phalcon-redos-in-default-mvc-and-cli-router-patterns)
- [Phalcon cphalcon timing side-channel in Crypt HMAC verification](https://junglewise.ai/threats/cve-2026-54736-phalcon-cphalcon-timing-side-channel-in-crypt-hmac-verification)
