CVE-2026-133771 Affecting php-twig package, versions *


Severity

Recommended
low

Based on default assessment until relevant scores are available.

Threat Intelligence

EPSS
0.67% (48th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-ECHOLATEST-PHPTWIG-22989388
  • published26 Nov 2026
  • disclosed24 Nov 2026

Introduced: 24 Nov 2026

NewCVE-2026-133771  (opens in a new tab)

How to fix?

There is no fixed version for Echo:latest php-twig.

NVD Description

Note: Versions mentioned in the description apply only to the upstream php-twig package and not the php-twig package as distributed by Echo. See How to fix? for Echo:latest relevant fixed versions and status.

The escaper considered x.attr, x['key'] and x.method() safe whenever {% import ... as x %} appeared anywhere in the template. Macro calls haven't needed this rule since Twig 3.0. It only matched ordinary variables that have the name of an alias imported in another block or macro, and printed them without escaping:

{% block header %}{% import _self as item %}{{ item.hello() }}{% endblock %} {% block content %}{% for item in items %}{{ item.body }}{% endfor %}{% endblock %}

Here, item.body is printed raw. This leads to XSS when the value comes from an attacker. The same happens with an import in a macro and an argument of the same name in another macro. It also happens with a template-level import placed after the block that uses the name.

The rule is removed. Macro calls through an alias are still considered safe.