CVE-2026-59989
PHP Análise e mitigação de vulnerabilidades

Visão geral

CVE-2026-59989 is a compile-time PHP code injection vulnerability (Server-Side Template Injection leading to Remote Code Execution) in the Volt template compiler of the Phalcon PHP framework. The flaw affects Phalcon versions 5.15.0 and earlier (phalcon/cphalcon Composer package) and was originally reported by researcher nikkoenggaliano, with the advisory published on July 10, 2026, and added to the GitHub Advisory Database on August 21, 2026. It carries a CVSS v4.0 base score of 9.2 (Critical) (Github Advisory).

Detalhes técnicos

The root cause lies in phalcon/Mvc/View/Engine/Volt/Compiler.zep at lines 2544–2546, where the resolveFilter() function handles the join filter by directly string-concatenating raw template token values — the separator and array argument — into generated PHP code without routing them through the expression() method that all other Volt expressions use for escaping (CWE-94, CWE-1336). The vulnerable code is effectively "join('" . funcArguments[1]["expr"]["value"] . "', " . funcArguments[0]["expr"]["value"] . ")", meaning an attacker-controlled separator containing a single quote can break out of the generated join('...') call and inject arbitrary PHP statements. Because Volt writes the compiled template to a cache file and require()s it at render time via Phalcon\Mvc\View\Engine\Volt::render(), the injected PHP executes in the web server process. Exploitation requires the attacker to be able to influence Volt template source (e.g., through a feature that allows user-supplied template content) (Github Advisory, Patch Commit).

Impacto

Successful exploitation allows an attacker to inject and execute arbitrary PHP code with the privileges of the web server process, resulting in full confidentiality, integrity, and availability compromise of the affected server. An attacker can read sensitive files, modify application data, establish persistent backdoors, or pivot to other internal systems. The impact is scoped to applications that compile attacker-influenced Volt template source; applications where templates are entirely developer-controlled are not at risk (Github Advisory).

Exploração

No public proof-of-concept exploit code has been observed, and there is no evidence of active in-the-wild exploitation at the time of disclosure (Github Advisory). The EPSS score is approximately 0.313% (24th percentile), indicating a relatively low near-term exploitation probability. The vulnerability is not currently listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation requires the precondition that an attacker can influence Volt template source content, which limits the attack surface to applications with user-controlled template input.

Etapas de exploração

  1. Identify target: Locate a Phalcon application (version ≤ 5.15.0) that compiles Volt templates containing user-supplied or attacker-influenced content — for example, a CMS, email template editor, or any feature that passes user input into a Volt template string.
  2. Craft malicious join filter argument: Construct a Volt template snippet using the join filter with a separator argument containing a single quote to break out of the generated PHP string context, followed by arbitrary PHP code. For example: {{ ['a','b']|join("', system('id'), '") }}.
  3. Trigger template compilation: Submit the malicious template content through the application's interface so that the Volt compiler processes it. The compiler will produce a cache file containing the injected PHP (e.g., join('', system('id'), '', $array)).
  4. Trigger template rendering: Cause the application to render the compiled template (e.g., by navigating to the affected view), which causes Phalcon\Mvc\View\Engine\Volt::render() to require() the poisoned cache file, executing the injected PHP code as the web server process user.
  5. Achieve objectives: Use the RCE foothold to exfiltrate data, establish a reverse shell, or perform lateral movement within the server environment (Github Advisory, Patch Commit).

Indicadores de compromisso

  • File System: Unexpected or recently modified .php files in the Volt template cache directory (typically app/cache/ or a configured compiledPath) containing unusual PHP constructs such as system(), exec(), passthru(), shell_exec(), or eval() calls embedded within otherwise normal join() expressions.
  • File System: Temporary PHP files created in the system temp directory (e.g., /tmp/volt*.php) if an attacker is testing compilation locally.
  • Logs: Web server access logs showing repeated or unusual POST/GET requests to endpoints that accept template input or trigger view rendering, particularly with payloads containing single quotes and PHP function names in template parameters.
  • Process: Unexpected child processes spawned by the PHP-FPM or web server process (e.g., sh, bash, curl, wget, python) that are not part of normal application behavior.
  • Network: Outbound connections from the web server to external IPs or DNS lookups for attacker-controlled domains initiated by the web server process, potentially indicating reverse shell or data exfiltration activity.

Mitigação e soluções alternativas

The fix is available in Phalcon version 5.16.0, released June 22, 2026, which routes both join filter arguments through the expression() method to ensure proper escaping (Phalcon Release, Patch Commit). Upgrade to phalcon/cphalcon version 5.16.0 or later via Composer (composer update phalcon/cphalcon). As a workaround for applications that cannot immediately upgrade, restrict write access to Volt template source files and cache directories to trusted administrators only, and ensure no user-supplied data is passed into Volt template compilation. Audit application code for any code paths that compile user-controlled strings as Volt templates.

Reações da comunidade

The vulnerability was reported by researcher nikkoenggaliano and published by Phalcon maintainer niden (Github Advisory). A Korean-language threat intelligence report referencing the CVE was noted in the Argus AI Threat Intelligence repository shortly after public disclosure. General community awareness appears limited, consistent with the niche attack surface (applications with user-controlled Volt template input).

Recursos adicionais


OrigemEste relatório foi gerado usando IA

Relacionado PHP Vulnerabilidades:

CVE ID

Gravidade

Pontuação

Tecnologias

Nome do componente

Exploração do CISA KEV

Tem correção

Data de publicação

CVE-2026-59989CRITICAL9.2
  • PHP logoPHP
  • phalcon/cphalcon
NãoSimAug 21, 2026
CVE-2026-63135HIGH8.2
  • PHP logoPHP
  • yourls/yourls
NãoSimAug 21, 2026
GHSA-p2ch-c2c3-4xm5MEDIUM6.1
  • PHP logoPHP
  • winter/wn-backend-module
NãoSimAug 20, 2026
GHSA-8hgv-xc77-jmcrMEDIUM5.1
  • PHP logoPHP
  • getgrav/grav
NãoSimAug 21, 2026
GHSA-hq84-x37p-j6q5MEDIUM4.5
  • PHP logoPHP
  • winter/wn-backend-module
NãoSimAug 20, 2026

Avaliação de vulnerabilidade gratuita

Compare sua postura de segurança na nuvem

Avalie suas práticas de segurança na nuvem em 9 domínios de segurança para comparar seu nível de risco e identificar lacunas em suas defesas.

Solicitar avaliação

Marque uma demonstração personalizada

Pronto para ver a Wiz em ação?

"A melhor experiência do usuário que eu já vi, fornece visibilidade total para cargas de trabalho na nuvem."
David EstlickCISO
"A Wiz fornece um único painel de vidro para ver o que está acontecendo em nossos ambientes de nuvem."
Adam FletcherDiretor de Segurança
"Sabemos que se a Wiz identifica algo como crítico, na verdade é."
Greg PoniatowskiChefe de Gerenciamento de Ameaças e Vulnerabilidades