CVE-2026-46639
Analyzed Analyzed - Analysis Complete

Object-Destructuring Assignment Flaw in Twig PHP Template Engine

Vulnerability report for CVE-2026-46639, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-07-14

Last updated on: 2026-07-16

Assigner: GitHub, Inc.

Description

Twig is a template language for PHP. From 3.24.0 until 3.26.0, object-destructuring assignment compiles CoreExtension::getAttribute() with the sandbox argument hardcoded to false, disabling property and method policy checks and allowing an attacker with write access to a sandboxed Twig template to read public properties or invoke public getters on objects passed to the template engine. This issue is fixed in version 3.26.0.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-07-14
Last Modified
2026-07-16
Generated
2026-08-04
AI Q&A
2026-07-15
EPSS Evaluated
2026-08-02
NVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
symfony twig From 3.24.0 (inc) to 3.26.0 (exc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-693 The product does not use or incorrectly uses a protection mechanism that provides sufficient defense against directed attacks against the product.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

Twig is a PHP template language. Between versions 3.24.0 and 3.26.0, a flaw in object-destructuring assignment caused CoreExtension::getAttribute() to run with sandboxing disabled. This allowed attackers with write access to sandboxed templates to bypass property and method checks, potentially reading public properties or invoking public getters on objects passed to the engine.

Detection Guidance

This vulnerability affects Twig versions between 3.24.0 and 3.26.0. To detect it, check the installed Twig version using commands like 'composer show twig/twig' or 'php -r "echo Twig\Environment::VERSION . PHP_EOL;"'.

Impact Analysis

If you use Twig versions 3.24.0 to 3.26.0 in a sandboxed environment, an attacker with template write access could exploit this to read sensitive data or execute unintended methods on objects. This could lead to information disclosure or unauthorized actions depending on the application's context.

Compliance Impact

This vulnerability could impact compliance by enabling unauthorized data access or modification in sandboxed environments. For GDPR, it may lead to unauthorized processing of personal data. For HIPAA, it could expose protected health information. Organizations must ensure patched versions are deployed to maintain compliance.

Mitigation Strategies

Upgrade Twig to version 3.26.0 or later immediately. If using Composer, run 'composer update twig/twig'. If manual installation, download the latest version from the official Twig repository.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-46639. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart