Description
Twig is a template language for PHP. Prior to 3.27.0, the column filter passes the active sandbox state as a boolean but does not forward the current Source to SandboxExtension::checkPropertyAllowed(), so SourcePolicyInterface decisions are lost and a template author can read public or magic properties not allowed by the sandbox policy. This issue is fixed in version 3.27.0.
Published: 2026-07-14
Score: 6 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Twig is a template language for PHP. Prior to version 3.27.0, the column filter passes the active sandbox state as a boolean but does not forward the current Source to SandboxExtension::checkPropertyAllowed(), so SourcePolicyInterface decisions are lost and a template author can read public or magic properties that are not allowed by the sandbox policy. This issue is fixed in version 3.27.0. The vulnerability is categorized under CWE‑693 and CWE‑863.

Affected Systems

All installations of twigphp:Twig prior to version 3.27.0 are vulnerable. The fix is included in release 3.27.0. Users running Twig 3.26.x or earlier are impacted, regardless of the specific sub‑version.

Risk and Exploitability

The CVSS score of 6 reflects a medium severity risk, and the EPSS score of less than 1% indicates a low likelihood of widespread exploitation. The vulnerability is not listed in the CISA KEV catalog. Based on the description, the likely attack vector is an attacker who can supply or otherwise influence template content that is processed under a sandboxed rendering context. The attack requires that the sandbox be active; if sandboxing is not enabled or if the template producer is fully trusted, the flaw has no effect. Exploitation does not require arbitrary code execution, but it can leak sensitive data otherwise protected by the sandbox.

Generated by OpenCVE AI on July 31, 2026 at 04:32 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Twig to version 3.27.0 or later; the patch removes the CWE‑693 failure to enforce sandbox property checks.
  • Reconfigure the sandbox to deny all properties by default and allow only a whitelisted subset; this mitigates CWE‑863 by tightening property validation and preventing unintended exposure.
  • Audit third‑party extensions that generate Twig code, ensuring they are updated to a Twig version that includes the CWE‑693 fix, or disable them during sandboxed rendering to avoid leveraging the bypass.

Generated by OpenCVE AI on July 31, 2026 at 04:32 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-h8vq-8gpg-mhcg Twig: Sandbox property allowlist bypass via the `column` filter under `SourcePolicyInterface`
History

Wed, 15 Jul 2026 15:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Wed, 15 Jul 2026 15:15:00 +0000

Type Values Removed Values Added
First Time appeared Twigphp
Twigphp twig
Vendors & Products Twigphp
Twigphp twig

Tue, 14 Jul 2026 21:45:00 +0000

Type Values Removed Values Added
Description Twig is a template language for PHP. Prior to 3.27.0, the column filter passes the active sandbox state as a boolean but does not forward the current Source to SandboxExtension::checkPropertyAllowed(), so SourcePolicyInterface decisions are lost and a template author can read public or magic properties not allowed by the sandbox policy. This issue is fixed in version 3.27.0.
Title Twig: Sandbox property allowlist bypass via the `column` filter under `SourcePolicyInterface`
Weaknesses CWE-693
CWE-863
References
Metrics cvssV4_0

{'score': 6, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-15T14:31:58.897Z

Reserved: 2026-05-22T20:57:10.976Z

Link: CVE-2026-48808

cve-icon Vulnrichment

Updated: 2026-07-15T14:31:52.658Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-31T04:45:17Z

Weaknesses
  • CWE-693

    Protection Mechanism Failure

  • CWE-863

    Incorrect Authorization