CVE-2026-46635·PHP vulnerability
Twig is a template language for PHP. Prior to 3.26.0, the column filter passes object arrays to PHP array_column(), which reads public and magic properties without reaching CoreExtension::getAttribute() or SandboxExtension::checkPropertyAllowed(), allowing an untrusted template author with column in allowedFilters to read properties that are not in the sandbox allowlist. This issue is fixed in version 3.26.0.
- Severity
- medium
- Software
- PHP
- Fixed in
- 3.26.0
- Published
How likely is exploitation
FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at 0.30% — higher than 22% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.
Affected versions
Until: 3.26.0
Fixed in: 3.26.0
How to fix this CVE
Update PHP and the Twig templating engine to version 3.26.0 or later to patch a sandbox escape vulnerability in the column filter. This fix ensures that Twig's sandbox restrictions are properly enforced when filtering object arrays, preventing unauthorized access to sensitive properties. Apply the security update through your distribution's package manager as soon as possible.
sudo dnf update phpDefensia detects this vulnerability
How to check if you are affected
- Check installed PHP version: php -v
- Verify Twig version in use: grep -r 'twig/twig' /path/to/composer.lock or check vendor directory
- Search application logs for column filter usage: grep -r 'column' /var/www/html/templates/ --include='*.twig'
- Confirm patch was applied: php -r "echo phpversion(); echo ' - Twig ' . (class_exists('Twig\Environment') ? method_exists('Twig\Extension\CoreExtension', 'getAttribute') ? 'patched' : 'unpatched' : 'not installed');"
- Review access logs for attempts to filter sensitive object properties via templates: grep -i 'column.*property' /var/log/apache2/access.log
FAQ
What is CVE-2026-46635?
A sandbox bypass vulnerability in Twig's column filter that allows untrusted template authors to read restricted object properties by directly passing arrays to PHP's array_column() function, circumventing the normal sandbox validation checks.
Is CVE-2026-46635 being actively exploited?
No, this vulnerability is not currently listed on the CISA KEV catalog and no public exploits are available. However, it should still be patched promptly as it affects template processing security.
What versions of PHP are affected by CVE-2026-46635?
This affects Twig versions prior to 3.26.0. PHP itself is not directly vulnerable; the vulnerability lies in the Twig templating library used within PHP applications.
How do I check if my server is vulnerable to CVE-2026-46635?
Run 'php -r "echo exec('composer show twig/twig 2>/dev/null | grep Version');"' to check Twig version, or examine composer.lock for 'twig/twig' and verify the version is below 3.26.0.
Does Defensia detect CVE-2026-46635?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Twig is installed on a monitored server, CVE-2026-46635 will appear in your dashboard with remediation steps.
Related PHP CVEs
References
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-46635. Free for 1 server.
Get started free