Search
Find a vulnerability
Search criteria
18 vulnerabilities found for twig/twig by Twig
CVE-2026-133772 (GCVE-0-2026-133772)
Vulnerability from nvd – Published: 2026-11-24 13:07 – Updated: 2026-11-24 13:07
VLAI
EPSS
VEX
Title
Sandbox Tag Allow-List Bypass via the Branch of a `guard` Tag That Isn't Selected
Summary
The guard tag compiles only one of its branches, depending on whether a callable exists. The other branch was still parsed, though. The extends, use, macro and block tags in it registered their effects on the template. The sandbox doesn't see these tags, since that branch isn't compiled. A sandboxed template allowed to use guard could therefore extend a template, import blocks and define macros, while the policy doesn't allow these tags:
{% guard filter upper %}{% else %}{% extends "parent.html" %}{% endguard %}
The templates reached this way come from the loader of the sandbox, and they are sandboxed too.
What the branch that isn't selected registers on the parser is now discarded.
Severity
CWE
- CWE-863 - Incorrect Authorization
References
3 references
| URL | Tags |
|---|---|
| https://symfony.com/cve-2026-133772 | vendor-advisory |
| https://github.com/twigphp/Twig/security/advisori… | vendor-advisory |
| https://github.com/twigphp/Twig/commit/d5011f4654… | patch |
Impacted products
Date Public
2026-11-24 12:58
{
"containers": {
"cna": {
"affected": [
{
"collectionURL": "https://packagist.org",
"defaultStatus": "unaffected",
"packageName": "twig/twig",
"product": "twig/twig",
"repo": "https://github.com/twigphp/Twig",
"vendor": "Twig",
"versions": [
{
"lessThan": "3.31.0",
"status": "affected",
"version": "3.15.0",
"versionType": "semver"
}
]
}
],
"credits": [
{
"lang": "en",
"type": "remediation developer",
"value": "Fabien Potencier"
}
],
"datePublic": "2026-11-24T12:58:51.000Z",
"descriptions": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/markdown",
"value": "The `guard` tag compiles only one of its branches, depending on whether a callable exists. The other branch was still parsed, though. The `extends`, `use`, `macro` and `block` tags in it registered their effects on the template. The sandbox doesn\u0027t see these tags, since that branch isn\u0027t compiled. A sandboxed template allowed to use `guard` could therefore extend a template, import blocks and define macros, while the policy doesn\u0027t allow these tags:\n\n```twig\n{% guard filter upper %}{% else %}{% extends \"parent.html\" %}{% endguard %}\n```\n\nThe templates reached this way come from the loader of the sandbox, and they are sandboxed too.\n\nWhat the branch that isn\u0027t selected registers on the parser is now discarded."
}
],
"value": "The guard tag compiles only one of its branches, depending on whether a callable exists. The other branch was still parsed, though. The extends, use, macro and block tags in it registered their effects on the template. The sandbox doesn\u0027t see these tags, since that branch isn\u0027t compiled. A sandboxed template allowed to use guard could therefore extend a template, import blocks and define macros, while the policy doesn\u0027t allow these tags:\n\n{% guard filter upper %}{% else %}{% extends \"parent.html\" %}{% endguard %}\n\nThe templates reached this way come from the loader of the sandbox, and they are sandboxed too.\n\nWhat the branch that isn\u0027t selected registers on the parser is now discarded."
}
],
"metrics": [
{
"cvssV4_0": {
"baseScore": 2.3,
"baseSeverity": "LOW",
"vectorString": "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N",
"version": "4.0"
},
"format": "CVSS",
"scenarios": [
{
"lang": "en",
"value": "GENERAL"
}
]
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-863",
"description": "CWE-863 Incorrect Authorization",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-11-24T13:07:54.995Z",
"orgId": "b5aa5c7f-767d-4597-9c64-3ac08b8711c6",
"shortName": "Symfony"
},
"references": [
{
"name": "CVE-2026-133772",
"tags": [
"vendor-advisory"
],
"url": "https://symfony.com/cve-2026-133772"
},
{
"name": "GHSA-qr49-4294-4gmw",
"tags": [
"vendor-advisory"
],
"url": "https://github.com/twigphp/Twig/security/advisories/GHSA-qr49-4294-4gmw"
},
{
"tags": [
"patch"
],
"url": "https://github.com/twigphp/Twig/commit/d5011f4654042f03d8986b5b3ba12a4d85f976f8"
}
],
"source": {
"advisory": "GHSA-qr49-4294-4gmw",
"discovery": "UNKNOWN"
},
"title": "Sandbox Tag Allow-List Bypass via the Branch of a `guard` Tag That Isn\u0027t Selected",
"x_generator": {
"engine": "symfony/ghsa-to-cve"
}
}
},
"cveMetadata": {
"assignerOrgId": "b5aa5c7f-767d-4597-9c64-3ac08b8711c6",
"assignerShortName": "Symfony",
"cveId": "CVE-2026-133772",
"datePublished": "2026-11-24T13:07:54.995Z",
"dateReserved": "2026-11-20T14:01:43.159Z",
"dateUpdated": "2026-11-24T13:07:54.995Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
CVE-2026-133771 (GCVE-0-2026-133771)
Vulnerability from nvd – Published: 2026-11-24 13:07 – Updated: 2026-11-24 13:07
VLAI
EPSS
VEX
Title
Missing autoescaping for a variable named like a macro import alias of another scope
Summary
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.
Severity
CWE
References
3 references
| URL | Tags |
|---|---|
| https://symfony.com/cve-2026-133771 | vendor-advisory |
| https://github.com/twigphp/Twig/security/advisori… | vendor-advisory |
| https://github.com/twigphp/Twig/commit/3a6745a0d8… | patch |
Date Public
2026-11-24 12:58
{
"containers": {
"cna": {
"affected": [
{
"collectionURL": "https://packagist.org",
"defaultStatus": "unaffected",
"packageName": "twig/twig",
"product": "twig/twig",
"repo": "https://github.com/twigphp/Twig",
"vendor": "Twig",
"versions": [
{
"lessThan": "3.31.0",
"status": "affected",
"version": "0",
"versionType": "semver"
}
]
}
],
"credits": [
{
"lang": "en",
"type": "remediation developer",
"value": "Jack Worman"
}
],
"datePublic": "2026-11-24T12:58:48.000Z",
"descriptions": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/markdown",
"value": "The escaper considered `x.attr`, `x[\u0027key\u0027]` and `x.method()` safe whenever `{% import ... as x %}` appeared anywhere in the template. Macro calls haven\u0027t 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:\n\n```twig\n{% block header %}{% import _self as item %}{{ item.hello() }}{% endblock %}\n{% block content %}{% for item in items %}{{ item.body }}{% endfor %}{% endblock %}\n```\n\nHere, `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.\n\nThe rule is removed. Macro calls through an alias are still considered safe."
}
],
"value": "The escaper considered x.attr, x[\u0027key\u0027] and x.method() safe whenever {% import ... as x %} appeared anywhere in the template. Macro calls haven\u0027t 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:\n\n{% block header %}{% import _self as item %}{{ item.hello() }}{% endblock %}\n{% block content %}{% for item in items %}{{ item.body }}{% endfor %}{% endblock %}\n\nHere, 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.\n\nThe rule is removed. Macro calls through an alias are still considered safe."
}
],
"metrics": [
{
"cvssV4_0": {
"baseScore": 2.3,
"baseSeverity": "LOW",
"vectorString": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N",
"version": "4.0"
},
"format": "CVSS",
"scenarios": [
{
"lang": "en",
"value": "GENERAL"
}
]
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-79",
"description": "CWE-79 Improper Neutralization of Input During Web Page Generation",
"lang": "en",
"type": "CWE"
}
]
},
{
"descriptions": [
{
"cweId": "CWE-116",
"description": "CWE-116 Improper Encoding or Escaping of Output",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-11-24T13:07:54.072Z",
"orgId": "b5aa5c7f-767d-4597-9c64-3ac08b8711c6",
"shortName": "Symfony"
},
"references": [
{
"name": "CVE-2026-133771",
"tags": [
"vendor-advisory"
],
"url": "https://symfony.com/cve-2026-133771"
},
{
"name": "GHSA-63v2-9rx5-wjgr",
"tags": [
"vendor-advisory"
],
"url": "https://github.com/twigphp/Twig/security/advisories/GHSA-63v2-9rx5-wjgr"
},
{
"tags": [
"patch"
],
"url": "https://github.com/twigphp/Twig/commit/3a6745a0d88048474457fa2e69968ebd5267dd5a"
}
],
"source": {
"advisory": "GHSA-63v2-9rx5-wjgr",
"discovery": "UNKNOWN"
},
"title": "Missing autoescaping for a variable named like a macro import alias of another scope",
"x_generator": {
"engine": "symfony/ghsa-to-cve"
}
}
},
"cveMetadata": {
"assignerOrgId": "b5aa5c7f-767d-4597-9c64-3ac08b8711c6",
"assignerShortName": "Symfony",
"cveId": "CVE-2026-133771",
"datePublished": "2026-11-24T13:07:54.072Z",
"dateReserved": "2026-11-20T14:01:43.159Z",
"dateUpdated": "2026-11-24T13:07:54.072Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
CVE-2026-133770 (GCVE-0-2026-133770)
Vulnerability from nvd – Published: 2026-11-24 13:07 – Updated: 2026-11-24 13:07
VLAI
EPSS
VEX
Title
Sandboxed templates can rewrite application-owned `Markup` objects through their constructor
Summary
The sandbox allows every method of Twig\Markup objects, including their public constructor. A sandboxed template can therefore call __construct() on any Markup object that it reaches, and replace its content:
{% do banner.__construct('<script>alert(1)</script>', 'UTF-8') %}
A template gains nothing by rewriting its own output. The impact is on the Markup objects that come from the application and are also rendered elsewhere, like a global in a long-running worker. Their new content then ends up in trusted pages that aren't sandboxed.
The sandbox no longer allows calling the constructor of Markup objects.
Severity
CWE
References
3 references
| URL | Tags |
|---|---|
| https://symfony.com/cve-2026-133770 | vendor-advisory |
| https://github.com/twigphp/Twig/security/advisori… | vendor-advisory |
| https://github.com/twigphp/Twig/commit/97b2e40b11… | patch |
Date Public
2026-11-24 12:58
{
"containers": {
"cna": {
"affected": [
{
"collectionURL": "https://packagist.org",
"defaultStatus": "unaffected",
"packageName": "twig/twig",
"product": "twig/twig",
"repo": "https://github.com/twigphp/Twig",
"vendor": "Twig",
"versions": [
{
"lessThan": "3.31.1",
"status": "affected",
"version": "0",
"versionType": "semver"
}
]
}
],
"credits": [
{
"lang": "en",
"type": "remediation developer",
"value": "Fabien Potencier"
}
],
"datePublic": "2026-11-24T12:58:46.000Z",
"descriptions": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/markdown",
"value": "The sandbox allows every method of `Twig\\Markup` objects, including their public constructor. A sandboxed template can therefore call `__construct()` on any `Markup` object that it reaches, and replace its content:\n\n```twig\n{% do banner.__construct(\u0027\u003cscript\u003ealert(1)\u003c/script\u003e\u0027, \u0027UTF-8\u0027) %}\n```\n\nA template gains nothing by rewriting its own output. The impact is on the `Markup` objects that come from the application and are also rendered elsewhere, like a global in a long-running worker. Their new content then ends up in trusted pages that aren\u0027t sandboxed.\n\nThe sandbox no longer allows calling the constructor of `Markup` objects."
}
],
"value": "The sandbox allows every method of Twig\\Markup objects, including their public constructor. A sandboxed template can therefore call __construct() on any Markup object that it reaches, and replace its content:\n\n{% do banner.__construct(\u0027\u003cscript\u003ealert(1)\u003c/script\u003e\u0027, \u0027UTF-8\u0027) %}\n\nA template gains nothing by rewriting its own output. The impact is on the Markup objects that come from the application and are also rendered elsewhere, like a global in a long-running worker. Their new content then ends up in trusted pages that aren\u0027t sandboxed.\n\nThe sandbox no longer allows calling the constructor of Markup objects."
}
],
"metrics": [
{
"cvssV4_0": {
"baseScore": 2.1,
"baseSeverity": "LOW",
"vectorString": "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:P/VC:N/VI:L/VA:N/SC:L/SI:L/SA:N",
"version": "4.0"
},
"format": "CVSS",
"scenarios": [
{
"lang": "en",
"value": "GENERAL"
}
]
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-79",
"description": "CWE-79 Improper Neutralization of Input During Web Page Generation",
"lang": "en",
"type": "CWE"
}
]
},
{
"descriptions": [
{
"cweId": "CWE-863",
"description": "CWE-863 Incorrect Authorization",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-11-24T13:07:53.166Z",
"orgId": "b5aa5c7f-767d-4597-9c64-3ac08b8711c6",
"shortName": "Symfony"
},
"references": [
{
"name": "CVE-2026-133770",
"tags": [
"vendor-advisory"
],
"url": "https://symfony.com/cve-2026-133770"
},
{
"name": "GHSA-r34x-hh9h-9q9c",
"tags": [
"vendor-advisory"
],
"url": "https://github.com/twigphp/Twig/security/advisories/GHSA-r34x-hh9h-9q9c"
},
{
"tags": [
"patch"
],
"url": "https://github.com/twigphp/Twig/commit/97b2e40b1165e6a42a197843f96ccb0a55f46f34"
}
],
"source": {
"advisory": "GHSA-r34x-hh9h-9q9c",
"discovery": "UNKNOWN"
},
"title": "Sandboxed templates can rewrite application-owned `Markup` objects through their constructor",
"x_generator": {
"engine": "symfony/ghsa-to-cve"
}
}
},
"cveMetadata": {
"assignerOrgId": "b5aa5c7f-767d-4597-9c64-3ac08b8711c6",
"assignerShortName": "Symfony",
"cveId": "CVE-2026-133770",
"datePublished": "2026-11-24T13:07:53.166Z",
"dateReserved": "2026-11-20T14:01:43.159Z",
"dateUpdated": "2026-11-24T13:07:53.166Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
CVE-2026-133768 (GCVE-0-2026-133768)
Vulnerability from nvd – Published: 2026-11-24 13:07 – Updated: 2026-11-24 13:07
VLAI
EPSS
VEX
Title
Sandbox property allow-list bypass via the `join` filter on non-iterable objects
Summary
The join filter converted a value that isn't iterable with (array) $value. For an object, that gives every property, including the private and protected ones. A sandboxed template allowed to use join could therefore print properties that the policy denies, and that templates can't read otherwise:
{{ user|join(',') }}
A value that isn't iterable is now joined as a single item. A Stringable object prints its checked string, and other objects throw, as with the first and last filters.
Severity
CWE
- CWE-863 - Incorrect Authorization
References
3 references
| URL | Tags |
|---|---|
| https://symfony.com/cve-2026-133768 | vendor-advisory |
| https://github.com/twigphp/Twig/security/advisori… | vendor-advisory |
| https://github.com/twigphp/Twig/commit/6bcede1346… | patch |
Date Public
2026-11-24 12:58
{
"containers": {
"cna": {
"affected": [
{
"collectionURL": "https://packagist.org",
"defaultStatus": "unaffected",
"packageName": "twig/twig",
"product": "twig/twig",
"repo": "https://github.com/twigphp/Twig",
"vendor": "Twig",
"versions": [
{
"lessThan": "3.31.1",
"status": "affected",
"version": "0",
"versionType": "semver"
}
]
}
],
"credits": [
{
"lang": "en",
"type": "remediation developer",
"value": "Fabien Potencier"
}
],
"datePublic": "2026-11-24T12:58:41.000Z",
"descriptions": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/markdown",
"value": "The `join` filter converted a value that isn\u0027t iterable with `(array) $value`. For an object, that gives every property, including the private and protected ones. A sandboxed template allowed to use `join` could therefore print properties that the policy denies, and that templates can\u0027t read otherwise:\n\n```twig\n{{ user|join(\u0027,\u0027) }}\n```\n\nA value that isn\u0027t iterable is now joined as a single item. A `Stringable` object prints its checked string, and other objects throw, as with the `first` and `last` filters."
}
],
"value": "The join filter converted a value that isn\u0027t iterable with (array) $value. For an object, that gives every property, including the private and protected ones. A sandboxed template allowed to use join could therefore print properties that the policy denies, and that templates can\u0027t read otherwise:\n\n{{ user|join(\u0027,\u0027) }}\n\nA value that isn\u0027t iterable is now joined as a single item. A Stringable object prints its checked string, and other objects throw, as with the first and last filters."
}
],
"metrics": [
{
"cvssV4_0": {
"baseScore": 5.3,
"baseSeverity": "MEDIUM",
"vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N",
"version": "4.0"
},
"format": "CVSS",
"scenarios": [
{
"lang": "en",
"value": "GENERAL"
}
]
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-863",
"description": "CWE-863 Incorrect Authorization",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-11-24T13:07:51.336Z",
"orgId": "b5aa5c7f-767d-4597-9c64-3ac08b8711c6",
"shortName": "Symfony"
},
"references": [
{
"name": "CVE-2026-133768",
"tags": [
"vendor-advisory"
],
"url": "https://symfony.com/cve-2026-133768"
},
{
"name": "GHSA-p2x6-ppf3-32r3",
"tags": [
"vendor-advisory"
],
"url": "https://github.com/twigphp/Twig/security/advisories/GHSA-p2x6-ppf3-32r3"
},
{
"tags": [
"patch"
],
"url": "https://github.com/twigphp/Twig/commit/6bcede134671133a4a056199af5cf4749d189d72"
}
],
"source": {
"advisory": "GHSA-p2x6-ppf3-32r3",
"discovery": "UNKNOWN"
},
"title": "Sandbox property allow-list bypass via the `join` filter on non-iterable objects",
"x_generator": {
"engine": "symfony/ghsa-to-cve"
}
}
},
"cveMetadata": {
"assignerOrgId": "b5aa5c7f-767d-4597-9c64-3ac08b8711c6",
"assignerShortName": "Symfony",
"cveId": "CVE-2026-133768",
"datePublished": "2026-11-24T13:07:51.336Z",
"dateReserved": "2026-11-20T14:01:43.159Z",
"dateUpdated": "2026-11-24T13:07:51.336Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
CVE-2026-133767 (GCVE-0-2026-133767)
Vulnerability from nvd – Published: 2026-11-24 13:07 – Updated: 2026-11-24 13:07
VLAI
EPSS
VEX
Title
Sandbox allow-list and `__toString()` bypass via a dynamic `embed` parent expression
Summary
When the parent of an embed tag was an expression other than a string or a variable, the sandbox didn't see that expression. The functions, filters and tests of the expression weren't checked against the policy, and neither were its conversions to strings. A sandboxed template allowed to use embed could therefore call any function, filter or test, and any __toString() method:
{% embed 'leak_' ~ app_secret() %}{% endembed %}
Method calls and property reads were not affected, since they're checked at runtime.
The sandbox now checks the parent expression of embed like any other expression of the template.
Severity
References
3 references
| URL | Tags |
|---|---|
| https://symfony.com/cve-2026-133767 | vendor-advisory |
| https://github.com/twigphp/Twig/security/advisori… | vendor-advisory |
| https://github.com/twigphp/Twig/commit/fe395ad247… | patch |
Date Public
2026-11-24 12:58
{
"containers": {
"cna": {
"affected": [
{
"collectionURL": "https://packagist.org",
"defaultStatus": "unaffected",
"packageName": "twig/twig",
"product": "twig/twig",
"repo": "https://github.com/twigphp/Twig",
"vendor": "Twig",
"versions": [
{
"lessThan": "3.31.1",
"status": "affected",
"version": "0",
"versionType": "semver"
}
]
}
],
"credits": [
{
"lang": "en",
"type": "finder",
"value": "Ivan Tse"
},
{
"lang": "en",
"type": "remediation developer",
"value": "Fabien Potencier"
}
],
"datePublic": "2026-11-24T12:58:38.000Z",
"descriptions": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/markdown",
"value": "When the parent of an `embed` tag was an expression other than a string or a variable, the sandbox didn\u0027t see that expression. The functions, filters and tests of the expression weren\u0027t checked against the policy, and neither were its conversions to strings. A sandboxed template allowed to use `embed` could therefore call any function, filter or test, and any `__toString()` method:\n\n```twig\n{% embed \u0027leak_\u0027 ~ app_secret() %}{% endembed %}\n```\n\nMethod calls and property reads were not affected, since they\u0027re checked at runtime.\n\nThe sandbox now checks the parent expression of `embed` like any other expression of the template."
}
],
"value": "When the parent of an embed tag was an expression other than a string or a variable, the sandbox didn\u0027t see that expression. The functions, filters and tests of the expression weren\u0027t checked against the policy, and neither were its conversions to strings. A sandboxed template allowed to use embed could therefore call any function, filter or test, and any __toString() method:\n\n{% embed \u0027leak_\u0027 ~ app_secret() %}{% endembed %}\n\nMethod calls and property reads were not affected, since they\u0027re checked at runtime.\n\nThe sandbox now checks the parent expression of embed like any other expression of the template."
}
],
"metrics": [
{
"cvssV4_0": {
"baseScore": 5.3,
"baseSeverity": "MEDIUM",
"vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N",
"version": "4.0"
},
"format": "CVSS",
"scenarios": [
{
"lang": "en",
"value": "GENERAL"
}
]
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-693",
"description": "CWE-693 Protection Mechanism Failure",
"lang": "en",
"type": "CWE"
}
]
},
{
"descriptions": [
{
"cweId": "CWE-863",
"description": "CWE-863 Incorrect Authorization",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-11-24T13:07:50.411Z",
"orgId": "b5aa5c7f-767d-4597-9c64-3ac08b8711c6",
"shortName": "Symfony"
},
"references": [
{
"name": "CVE-2026-133767",
"tags": [
"vendor-advisory"
],
"url": "https://symfony.com/cve-2026-133767"
},
{
"name": "GHSA-fmp9-6wxr-cfmq",
"tags": [
"vendor-advisory"
],
"url": "https://github.com/twigphp/Twig/security/advisories/GHSA-fmp9-6wxr-cfmq"
},
{
"tags": [
"patch"
],
"url": "https://github.com/twigphp/Twig/commit/fe395ad247b8e6c6f34f39bc211119ecb11f80b3"
}
],
"source": {
"advisory": "GHSA-fmp9-6wxr-cfmq",
"discovery": "UNKNOWN"
},
"title": "Sandbox allow-list and `__toString()` bypass via a dynamic `embed` parent expression",
"x_generator": {
"engine": "symfony/ghsa-to-cve"
}
}
},
"cveMetadata": {
"assignerOrgId": "b5aa5c7f-767d-4597-9c64-3ac08b8711c6",
"assignerShortName": "Symfony",
"cveId": "CVE-2026-133767",
"datePublished": "2026-11-24T13:07:50.411Z",
"dateReserved": "2026-11-20T14:01:43.158Z",
"dateUpdated": "2026-11-24T13:07:50.411Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
CVE-2026-133766 (GCVE-0-2026-133766)
Vulnerability from nvd – Published: 2026-11-24 13:07 – Updated: 2026-11-24 13:07
VLAI
EPSS
VEX
Title
Sandbox `__toString()` policy bypass via spread arguments
Summary
Since Twig 3.28.0, the sandbox skips the toString() check of an argument whose PHP parameter can't hold a string, like an int. A spread argument was mapped to a single parameter, although it fills every parameter from its position on. A sandboxed template could therefore call a denied toString() method:
{{ tag(...[1, obj]) }}
Here, the first parameter of tag() is an int, and a later one accepts strings. Applications are affected when they allow such a function, filter or test in the sandbox. No built-in callable is affected.
A spread argument is now checked unless every parameter that it can fill has a safe type.
Severity
References
3 references
| URL | Tags |
|---|---|
| https://symfony.com/cve-2026-133766 | vendor-advisory |
| https://github.com/twigphp/Twig/security/advisori… | vendor-advisory |
| https://github.com/twigphp/Twig/commit/7af821c372… | patch |
Impacted products
Date Public
2026-11-24 12:58
{
"containers": {
"cna": {
"affected": [
{
"collectionURL": "https://packagist.org",
"defaultStatus": "unaffected",
"packageName": "twig/twig",
"product": "twig/twig",
"repo": "https://github.com/twigphp/Twig",
"vendor": "Twig",
"versions": [
{
"lessThan": "3.31.1",
"status": "affected",
"version": "3.28.0",
"versionType": "semver"
}
]
}
],
"credits": [
{
"lang": "en",
"type": "finder",
"value": "Jacko"
},
{
"lang": "en",
"type": "remediation developer",
"value": "Nicolas Grekas"
}
],
"datePublic": "2026-11-24T12:58:35.000Z",
"descriptions": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/markdown",
"value": "Since Twig 3.28.0, the sandbox skips the `__toString()` check of an argument whose PHP parameter can\u0027t hold a string, like an `int`. A spread argument was mapped to a single parameter, although it fills every parameter from its position on. A sandboxed template could therefore call a denied `__toString()` method:\n\n```twig\n{{ tag(...[1, obj]) }}\n```\n\nHere, the first parameter of `tag()` is an `int`, and a later one accepts strings. Applications are affected when they allow such a function, filter or test in the sandbox. No built-in callable is affected.\n\nA spread argument is now checked unless every parameter that it can fill has a safe type."
}
],
"value": "Since Twig 3.28.0, the sandbox skips the toString() check of an argument whose PHP parameter can\u0027t hold a string, like an int. A spread argument was mapped to a single parameter, although it fills every parameter from its position on. A sandboxed template could therefore call a denied toString() method:\n\n{{ tag(...[1, obj]) }}\n\nHere, the first parameter of tag() is an int, and a later one accepts strings. Applications are affected when they allow such a function, filter or test in the sandbox. No built-in callable is affected.\n\nA spread argument is now checked unless every parameter that it can fill has a safe type."
}
],
"metrics": [
{
"cvssV4_0": {
"baseScore": 2.3,
"baseSeverity": "LOW",
"vectorString": "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N",
"version": "4.0"
},
"format": "CVSS",
"scenarios": [
{
"lang": "en",
"value": "GENERAL"
}
]
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-693",
"description": "CWE-693 Protection Mechanism Failure",
"lang": "en",
"type": "CWE"
}
]
},
{
"descriptions": [
{
"cweId": "CWE-863",
"description": "CWE-863 Incorrect Authorization",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-11-24T13:07:49.491Z",
"orgId": "b5aa5c7f-767d-4597-9c64-3ac08b8711c6",
"shortName": "Symfony"
},
"references": [
{
"name": "CVE-2026-133766",
"tags": [
"vendor-advisory"
],
"url": "https://symfony.com/cve-2026-133766"
},
{
"name": "GHSA-56wp-8m9q-4354",
"tags": [
"vendor-advisory"
],
"url": "https://github.com/twigphp/Twig/security/advisories/GHSA-56wp-8m9q-4354"
},
{
"tags": [
"patch"
],
"url": "https://github.com/twigphp/Twig/commit/7af821c372f52cc9447afeba9e042de44b738222"
}
],
"source": {
"advisory": "GHSA-56wp-8m9q-4354",
"discovery": "UNKNOWN"
},
"title": "Sandbox `__toString()` policy bypass via spread arguments",
"x_generator": {
"engine": "symfony/ghsa-to-cve"
}
}
},
"cveMetadata": {
"assignerOrgId": "b5aa5c7f-767d-4597-9c64-3ac08b8711c6",
"assignerShortName": "Symfony",
"cveId": "CVE-2026-133766",
"datePublished": "2026-11-24T13:07:49.491Z",
"dateReserved": "2026-11-20T14:01:43.158Z",
"dateUpdated": "2026-11-24T13:07:49.491Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
CVE-2026-133765 (GCVE-0-2026-133765)
Vulnerability from nvd – Published: 2026-11-24 13:07 – Updated: 2026-11-24 13:07
VLAI
EPSS
VEX
Title
Sandbox `__toString()` policy bypass via assignment and destructuring expressions
Summary
The sandbox checks that a template may call toString() on an object before converting it to a string. Since Twig 3.23.0, assignments like x = obj, and the destructuring forms [a] = list and {a} = obj, evaluate to the value that they assign. The sandbox didn't check that value, so a sandboxed template could call a denied toString() method:
{{ (x = obj) }}
{{ ({secret: s} = obj)|join }}
No tag needs to be allowed.
The sandbox now checks the result of assignments like the result of filters and functions. {% do x = obj %} and {% if (x = obj) %} still work, since they don't convert the value to a string.
Severity
References
3 references
| URL | Tags |
|---|---|
| https://symfony.com/cve-2026-133765 | vendor-advisory |
| https://github.com/twigphp/Twig/security/advisori… | vendor-advisory |
| https://github.com/twigphp/Twig/commit/6bcdbc3d44… | patch |
Impacted products
Date Public
2026-11-24 12:58
{
"containers": {
"cna": {
"affected": [
{
"collectionURL": "https://packagist.org",
"defaultStatus": "unaffected",
"packageName": "twig/twig",
"product": "twig/twig",
"repo": "https://github.com/twigphp/Twig",
"vendor": "Twig",
"versions": [
{
"lessThan": "3.31.1",
"status": "affected",
"version": "3.23.0",
"versionType": "semver"
}
]
}
],
"credits": [
{
"lang": "en",
"type": "remediation developer",
"value": "Fabien Potencier"
},
{
"lang": "en",
"type": "finder",
"value": "Jacko"
},
{
"lang": "en",
"type": "finder",
"value": "Inanna Malick"
},
{
"lang": "en",
"type": "finder",
"value": "Tudor-Andrei Oprea"
}
],
"datePublic": "2026-11-24T12:58:32.000Z",
"descriptions": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/markdown",
"value": "The sandbox checks that a template may call `__toString()` on an object before converting it to a string. Since Twig 3.23.0, assignments like `x = obj`, and the destructuring forms `[a] = list` and `{a} = obj`, evaluate to the value that they assign. The sandbox didn\u0027t check that value, so a sandboxed template could call a denied `__toString()` method:\n\n```twig\n{{ (x = obj) }}\n{{ ({secret: s} = obj)|join }}\n```\n\nNo tag needs to be allowed.\n\nThe sandbox now checks the result of assignments like the result of filters and functions. `{% do x = obj %}` and `{% if (x = obj) %}` still work, since they don\u0027t convert the value to a string."
}
],
"value": "The sandbox checks that a template may call toString() on an object before converting it to a string. Since Twig 3.23.0, assignments like x = obj, and the destructuring forms [a] = list and {a} = obj, evaluate to the value that they assign. The sandbox didn\u0027t check that value, so a sandboxed template could call a denied toString() method:\n\n{{ (x = obj) }}\n{{ ({secret: s} = obj)|join }}\n\nNo tag needs to be allowed.\n\nThe sandbox now checks the result of assignments like the result of filters and functions. {% do x = obj %} and {% if (x = obj) %} still work, since they don\u0027t convert the value to a string."
}
],
"metrics": [
{
"cvssV4_0": {
"baseScore": 5.3,
"baseSeverity": "MEDIUM",
"vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N",
"version": "4.0"
},
"format": "CVSS",
"scenarios": [
{
"lang": "en",
"value": "GENERAL"
}
]
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-693",
"description": "CWE-693 Protection Mechanism Failure",
"lang": "en",
"type": "CWE"
}
]
},
{
"descriptions": [
{
"cweId": "CWE-863",
"description": "CWE-863 Incorrect Authorization",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-11-24T13:07:48.546Z",
"orgId": "b5aa5c7f-767d-4597-9c64-3ac08b8711c6",
"shortName": "Symfony"
},
"references": [
{
"name": "CVE-2026-133765",
"tags": [
"vendor-advisory"
],
"url": "https://symfony.com/cve-2026-133765"
},
{
"name": "GHSA-ccrc-gqhf-3cxc",
"tags": [
"vendor-advisory"
],
"url": "https://github.com/twigphp/Twig/security/advisories/GHSA-ccrc-gqhf-3cxc"
},
{
"tags": [
"patch"
],
"url": "https://github.com/twigphp/Twig/commit/6bcdbc3d4470dde23e3e2636e7053e0512387edd"
}
],
"source": {
"advisory": "GHSA-ccrc-gqhf-3cxc",
"discovery": "UNKNOWN"
},
"title": "Sandbox `__toString()` policy bypass via assignment and destructuring expressions",
"x_generator": {
"engine": "symfony/ghsa-to-cve"
}
}
},
"cveMetadata": {
"assignerOrgId": "b5aa5c7f-767d-4597-9c64-3ac08b8711c6",
"assignerShortName": "Symfony",
"cveId": "CVE-2026-133765",
"datePublished": "2026-11-24T13:07:48.546Z",
"dateReserved": "2026-11-20T14:01:43.158Z",
"dateUpdated": "2026-11-24T13:07:48.546Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
CVE-2026-133764 (GCVE-0-2026-133764)
Vulnerability from nvd – Published: 2026-11-24 13:07 – Updated: 2026-11-24 13:07
VLAI
EPSS
VEX
Title
Sandbox `__toString()` policy bypass via the input of custom tests
Summary
The sandbox checks that a template may call toString() on an object before converting it to a string. It didn't check the input of tests. The PHP callable of a test may convert this input to a string, for example when its parameter is typed as string. PHP then calls toString() on an object without the sandbox checking it first:
{{ obj is upperish }}
Applications are affected when they register such a test and allow it in the sandbox. No built-in test is affected.
The sandbox now checks the input of tests like the input of filters. The built-in tests that never convert their input to a string still skip the check.
Severity
References
3 references
| URL | Tags |
|---|---|
| https://symfony.com/cve-2026-133764 | vendor-advisory |
| https://github.com/twigphp/Twig/security/advisori… | vendor-advisory |
| https://github.com/twigphp/Twig/commit/978c60be74… | patch |
Date Public
2026-11-24 12:58
{
"containers": {
"cna": {
"affected": [
{
"collectionURL": "https://packagist.org",
"defaultStatus": "unaffected",
"packageName": "twig/twig",
"product": "twig/twig",
"repo": "https://github.com/twigphp/Twig",
"vendor": "Twig",
"versions": [
{
"lessThan": "3.31.1",
"status": "affected",
"version": "0",
"versionType": "semver"
}
]
}
],
"credits": [
{
"lang": "en",
"type": "finder",
"value": "Arpit Jain"
},
{
"lang": "en",
"type": "remediation developer",
"value": "Fabien Potencier"
}
],
"datePublic": "2026-11-24T12:58:30.000Z",
"descriptions": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/markdown",
"value": "The sandbox checks that a template may call `__toString()` on an object before converting it to a string. It didn\u0027t check the input of tests. The PHP callable of a test may convert this input to a string, for example when its parameter is typed as `string`. PHP then calls `__toString()` on an object without the sandbox checking it first:\n\n```twig\n{{ obj is upperish }}\n```\n\nApplications are affected when they register such a test and allow it in the sandbox. No built-in test is affected.\n\nThe sandbox now checks the input of tests like the input of filters. The built-in tests that never convert their input to a string still skip the check."
}
],
"value": "The sandbox checks that a template may call toString() on an object before converting it to a string. It didn\u0027t check the input of tests. The PHP callable of a test may convert this input to a string, for example when its parameter is typed as string. PHP then calls toString() on an object without the sandbox checking it first:\n\n{{ obj is upperish }}\n\nApplications are affected when they register such a test and allow it in the sandbox. No built-in test is affected.\n\nThe sandbox now checks the input of tests like the input of filters. The built-in tests that never convert their input to a string still skip the check."
}
],
"metrics": [
{
"cvssV4_0": {
"baseScore": 2.3,
"baseSeverity": "LOW",
"vectorString": "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N",
"version": "4.0"
},
"format": "CVSS",
"scenarios": [
{
"lang": "en",
"value": "GENERAL"
}
]
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-693",
"description": "CWE-693 Protection Mechanism Failure",
"lang": "en",
"type": "CWE"
}
]
},
{
"descriptions": [
{
"cweId": "CWE-863",
"description": "CWE-863 Incorrect Authorization",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-11-24T13:07:47.621Z",
"orgId": "b5aa5c7f-767d-4597-9c64-3ac08b8711c6",
"shortName": "Symfony"
},
"references": [
{
"name": "CVE-2026-133764",
"tags": [
"vendor-advisory"
],
"url": "https://symfony.com/cve-2026-133764"
},
{
"name": "GHSA-rc9g-xwx4-rmfh",
"tags": [
"vendor-advisory"
],
"url": "https://github.com/twigphp/Twig/security/advisories/GHSA-rc9g-xwx4-rmfh"
},
{
"tags": [
"patch"
],
"url": "https://github.com/twigphp/Twig/commit/978c60be74fc62a0f2c3af11ca5bc3609ae8b69a"
}
],
"source": {
"advisory": "GHSA-rc9g-xwx4-rmfh",
"discovery": "UNKNOWN"
},
"title": "Sandbox `__toString()` policy bypass via the input of custom tests",
"x_generator": {
"engine": "symfony/ghsa-to-cve"
}
}
},
"cveMetadata": {
"assignerOrgId": "b5aa5c7f-767d-4597-9c64-3ac08b8711c6",
"assignerShortName": "Symfony",
"cveId": "CVE-2026-133764",
"datePublished": "2026-11-24T13:07:47.621Z",
"dateReserved": "2026-11-20T14:01:43.158Z",
"dateUpdated": "2026-11-24T13:07:47.621Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
CVE-2026-133763 (GCVE-0-2026-133763)
Vulnerability from nvd – Published: 2026-11-24 13:07 – Updated: 2026-11-24 13:07
VLAI
EPSS
VEX
Title
Sandbox `__toString()` policy bypass via the `is true` test
Summary
The sandbox checks that a template may call toString() on an object before converting it to a string. For an object, the is true test evaluates to the object itself, and that result wasn't checked. A sandboxed template could therefore print an object through a denied toString() method:
{{ obj is true }}
The same applies when the result is concatenated or passed to a filter. No tag needs to be allowed. A test in a boolean context, like {% if obj is true %}, isn't affected, since it doesn't convert the object to a string.
The sandbox now checks the result of tests like the result of filters and functions.
Severity
References
3 references
| URL | Tags |
|---|---|
| https://symfony.com/cve-2026-133763 | vendor-advisory |
| https://github.com/twigphp/Twig/security/advisori… | vendor-advisory |
| https://github.com/twigphp/Twig/commit/a41bd2dd46… | patch |
Impacted products
Date Public
2026-11-24 12:58
{
"containers": {
"cna": {
"affected": [
{
"collectionURL": "https://packagist.org",
"defaultStatus": "unaffected",
"packageName": "twig/twig",
"product": "twig/twig",
"repo": "https://github.com/twigphp/Twig",
"vendor": "Twig",
"versions": [
{
"lessThan": "3.31.1",
"status": "affected",
"version": "3.21.0",
"versionType": "semver"
}
]
}
],
"credits": [
{
"lang": "en",
"type": "finder",
"value": "Eric Labrador Sainz"
},
{
"lang": "en",
"type": "finder",
"value": "Jacko"
},
{
"lang": "en",
"type": "finder",
"value": "Inanna Malick"
},
{
"lang": "en",
"type": "remediation developer",
"value": "Fabien Potencier"
}
],
"datePublic": "2026-11-24T12:58:27.000Z",
"descriptions": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/markdown",
"value": "The sandbox checks that a template may call `__toString()` on an object before converting it to a string. For an object, the `is true` test evaluates to the object itself, and that result wasn\u0027t checked. A sandboxed template could therefore print an object through a denied `__toString()` method:\n\n```twig\n{{ obj is true }}\n```\n\nThe same applies when the result is concatenated or passed to a filter. No tag needs to be allowed. A test in a boolean context, like `{% if obj is true %}`, isn\u0027t affected, since it doesn\u0027t convert the object to a string.\n\nThe sandbox now checks the result of tests like the result of filters and functions."
}
],
"value": "The sandbox checks that a template may call toString() on an object before converting it to a string. For an object, the is true test evaluates to the object itself, and that result wasn\u0027t checked. A sandboxed template could therefore print an object through a denied toString() method:\n\n{{ obj is true }}\n\nThe same applies when the result is concatenated or passed to a filter. No tag needs to be allowed. A test in a boolean context, like {% if obj is true %}, isn\u0027t affected, since it doesn\u0027t convert the object to a string.\n\nThe sandbox now checks the result of tests like the result of filters and functions."
}
],
"metrics": [
{
"cvssV4_0": {
"baseScore": 5.3,
"baseSeverity": "MEDIUM",
"vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N",
"version": "4.0"
},
"format": "CVSS",
"scenarios": [
{
"lang": "en",
"value": "GENERAL"
}
]
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-693",
"description": "CWE-693 Protection Mechanism Failure",
"lang": "en",
"type": "CWE"
}
]
},
{
"descriptions": [
{
"cweId": "CWE-863",
"description": "CWE-863 Incorrect Authorization",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-11-24T13:07:46.698Z",
"orgId": "b5aa5c7f-767d-4597-9c64-3ac08b8711c6",
"shortName": "Symfony"
},
"references": [
{
"name": "CVE-2026-133763",
"tags": [
"vendor-advisory"
],
"url": "https://symfony.com/cve-2026-133763"
},
{
"name": "GHSA-567w-cx2v-jc85",
"tags": [
"vendor-advisory"
],
"url": "https://github.com/twigphp/Twig/security/advisories/GHSA-567w-cx2v-jc85"
},
{
"tags": [
"patch"
],
"url": "https://github.com/twigphp/Twig/commit/a41bd2dd466d771cc384b9730be6190eb5a4f4d0"
}
],
"source": {
"advisory": "GHSA-567w-cx2v-jc85",
"discovery": "UNKNOWN"
},
"title": "Sandbox `__toString()` policy bypass via the `is true` test",
"x_generator": {
"engine": "symfony/ghsa-to-cve"
}
}
},
"cveMetadata": {
"assignerOrgId": "b5aa5c7f-767d-4597-9c64-3ac08b8711c6",
"assignerShortName": "Symfony",
"cveId": "CVE-2026-133763",
"datePublished": "2026-11-24T13:07:46.698Z",
"dateReserved": "2026-11-20T14:01:43.158Z",
"dateUpdated": "2026-11-24T13:07:46.698Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
CVE-2026-133772 (GCVE-0-2026-133772)
Vulnerability from cvelistv5 – Published: 2026-11-24 13:07 – Updated: 2026-11-24 13:07
VLAI
EPSS
VEX
Title
Sandbox Tag Allow-List Bypass via the Branch of a `guard` Tag That Isn't Selected
Summary
The guard tag compiles only one of its branches, depending on whether a callable exists. The other branch was still parsed, though. The extends, use, macro and block tags in it registered their effects on the template. The sandbox doesn't see these tags, since that branch isn't compiled. A sandboxed template allowed to use guard could therefore extend a template, import blocks and define macros, while the policy doesn't allow these tags:
{% guard filter upper %}{% else %}{% extends "parent.html" %}{% endguard %}
The templates reached this way come from the loader of the sandbox, and they are sandboxed too.
What the branch that isn't selected registers on the parser is now discarded.
Severity
CWE
- CWE-863 - Incorrect Authorization
References
3 references
| URL | Tags |
|---|---|
| https://symfony.com/cve-2026-133772 | vendor-advisory |
| https://github.com/twigphp/Twig/security/advisori… | vendor-advisory |
| https://github.com/twigphp/Twig/commit/d5011f4654… | patch |
Impacted products
Date Public
2026-11-24 12:58
{
"containers": {
"cna": {
"affected": [
{
"collectionURL": "https://packagist.org",
"defaultStatus": "unaffected",
"packageName": "twig/twig",
"product": "twig/twig",
"repo": "https://github.com/twigphp/Twig",
"vendor": "Twig",
"versions": [
{
"lessThan": "3.31.0",
"status": "affected",
"version": "3.15.0",
"versionType": "semver"
}
]
}
],
"credits": [
{
"lang": "en",
"type": "remediation developer",
"value": "Fabien Potencier"
}
],
"datePublic": "2026-11-24T12:58:51.000Z",
"descriptions": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/markdown",
"value": "The `guard` tag compiles only one of its branches, depending on whether a callable exists. The other branch was still parsed, though. The `extends`, `use`, `macro` and `block` tags in it registered their effects on the template. The sandbox doesn\u0027t see these tags, since that branch isn\u0027t compiled. A sandboxed template allowed to use `guard` could therefore extend a template, import blocks and define macros, while the policy doesn\u0027t allow these tags:\n\n```twig\n{% guard filter upper %}{% else %}{% extends \"parent.html\" %}{% endguard %}\n```\n\nThe templates reached this way come from the loader of the sandbox, and they are sandboxed too.\n\nWhat the branch that isn\u0027t selected registers on the parser is now discarded."
}
],
"value": "The guard tag compiles only one of its branches, depending on whether a callable exists. The other branch was still parsed, though. The extends, use, macro and block tags in it registered their effects on the template. The sandbox doesn\u0027t see these tags, since that branch isn\u0027t compiled. A sandboxed template allowed to use guard could therefore extend a template, import blocks and define macros, while the policy doesn\u0027t allow these tags:\n\n{% guard filter upper %}{% else %}{% extends \"parent.html\" %}{% endguard %}\n\nThe templates reached this way come from the loader of the sandbox, and they are sandboxed too.\n\nWhat the branch that isn\u0027t selected registers on the parser is now discarded."
}
],
"metrics": [
{
"cvssV4_0": {
"baseScore": 2.3,
"baseSeverity": "LOW",
"vectorString": "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N",
"version": "4.0"
},
"format": "CVSS",
"scenarios": [
{
"lang": "en",
"value": "GENERAL"
}
]
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-863",
"description": "CWE-863 Incorrect Authorization",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-11-24T13:07:54.995Z",
"orgId": "b5aa5c7f-767d-4597-9c64-3ac08b8711c6",
"shortName": "Symfony"
},
"references": [
{
"name": "CVE-2026-133772",
"tags": [
"vendor-advisory"
],
"url": "https://symfony.com/cve-2026-133772"
},
{
"name": "GHSA-qr49-4294-4gmw",
"tags": [
"vendor-advisory"
],
"url": "https://github.com/twigphp/Twig/security/advisories/GHSA-qr49-4294-4gmw"
},
{
"tags": [
"patch"
],
"url": "https://github.com/twigphp/Twig/commit/d5011f4654042f03d8986b5b3ba12a4d85f976f8"
}
],
"source": {
"advisory": "GHSA-qr49-4294-4gmw",
"discovery": "UNKNOWN"
},
"title": "Sandbox Tag Allow-List Bypass via the Branch of a `guard` Tag That Isn\u0027t Selected",
"x_generator": {
"engine": "symfony/ghsa-to-cve"
}
}
},
"cveMetadata": {
"assignerOrgId": "b5aa5c7f-767d-4597-9c64-3ac08b8711c6",
"assignerShortName": "Symfony",
"cveId": "CVE-2026-133772",
"datePublished": "2026-11-24T13:07:54.995Z",
"dateReserved": "2026-11-20T14:01:43.159Z",
"dateUpdated": "2026-11-24T13:07:54.995Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
CVE-2026-133771 (GCVE-0-2026-133771)
Vulnerability from cvelistv5 – Published: 2026-11-24 13:07 – Updated: 2026-11-24 13:07
VLAI
EPSS
VEX
Title
Missing autoescaping for a variable named like a macro import alias of another scope
Summary
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.
Severity
CWE
References
3 references
| URL | Tags |
|---|---|
| https://symfony.com/cve-2026-133771 | vendor-advisory |
| https://github.com/twigphp/Twig/security/advisori… | vendor-advisory |
| https://github.com/twigphp/Twig/commit/3a6745a0d8… | patch |
Date Public
2026-11-24 12:58
{
"containers": {
"cna": {
"affected": [
{
"collectionURL": "https://packagist.org",
"defaultStatus": "unaffected",
"packageName": "twig/twig",
"product": "twig/twig",
"repo": "https://github.com/twigphp/Twig",
"vendor": "Twig",
"versions": [
{
"lessThan": "3.31.0",
"status": "affected",
"version": "0",
"versionType": "semver"
}
]
}
],
"credits": [
{
"lang": "en",
"type": "remediation developer",
"value": "Jack Worman"
}
],
"datePublic": "2026-11-24T12:58:48.000Z",
"descriptions": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/markdown",
"value": "The escaper considered `x.attr`, `x[\u0027key\u0027]` and `x.method()` safe whenever `{% import ... as x %}` appeared anywhere in the template. Macro calls haven\u0027t 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:\n\n```twig\n{% block header %}{% import _self as item %}{{ item.hello() }}{% endblock %}\n{% block content %}{% for item in items %}{{ item.body }}{% endfor %}{% endblock %}\n```\n\nHere, `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.\n\nThe rule is removed. Macro calls through an alias are still considered safe."
}
],
"value": "The escaper considered x.attr, x[\u0027key\u0027] and x.method() safe whenever {% import ... as x %} appeared anywhere in the template. Macro calls haven\u0027t 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:\n\n{% block header %}{% import _self as item %}{{ item.hello() }}{% endblock %}\n{% block content %}{% for item in items %}{{ item.body }}{% endfor %}{% endblock %}\n\nHere, 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.\n\nThe rule is removed. Macro calls through an alias are still considered safe."
}
],
"metrics": [
{
"cvssV4_0": {
"baseScore": 2.3,
"baseSeverity": "LOW",
"vectorString": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N",
"version": "4.0"
},
"format": "CVSS",
"scenarios": [
{
"lang": "en",
"value": "GENERAL"
}
]
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-79",
"description": "CWE-79 Improper Neutralization of Input During Web Page Generation",
"lang": "en",
"type": "CWE"
}
]
},
{
"descriptions": [
{
"cweId": "CWE-116",
"description": "CWE-116 Improper Encoding or Escaping of Output",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-11-24T13:07:54.072Z",
"orgId": "b5aa5c7f-767d-4597-9c64-3ac08b8711c6",
"shortName": "Symfony"
},
"references": [
{
"name": "CVE-2026-133771",
"tags": [
"vendor-advisory"
],
"url": "https://symfony.com/cve-2026-133771"
},
{
"name": "GHSA-63v2-9rx5-wjgr",
"tags": [
"vendor-advisory"
],
"url": "https://github.com/twigphp/Twig/security/advisories/GHSA-63v2-9rx5-wjgr"
},
{
"tags": [
"patch"
],
"url": "https://github.com/twigphp/Twig/commit/3a6745a0d88048474457fa2e69968ebd5267dd5a"
}
],
"source": {
"advisory": "GHSA-63v2-9rx5-wjgr",
"discovery": "UNKNOWN"
},
"title": "Missing autoescaping for a variable named like a macro import alias of another scope",
"x_generator": {
"engine": "symfony/ghsa-to-cve"
}
}
},
"cveMetadata": {
"assignerOrgId": "b5aa5c7f-767d-4597-9c64-3ac08b8711c6",
"assignerShortName": "Symfony",
"cveId": "CVE-2026-133771",
"datePublished": "2026-11-24T13:07:54.072Z",
"dateReserved": "2026-11-20T14:01:43.159Z",
"dateUpdated": "2026-11-24T13:07:54.072Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
CVE-2026-133770 (GCVE-0-2026-133770)
Vulnerability from cvelistv5 – Published: 2026-11-24 13:07 – Updated: 2026-11-24 13:07
VLAI
EPSS
VEX
Title
Sandboxed templates can rewrite application-owned `Markup` objects through their constructor
Summary
The sandbox allows every method of Twig\Markup objects, including their public constructor. A sandboxed template can therefore call __construct() on any Markup object that it reaches, and replace its content:
{% do banner.__construct('<script>alert(1)</script>', 'UTF-8') %}
A template gains nothing by rewriting its own output. The impact is on the Markup objects that come from the application and are also rendered elsewhere, like a global in a long-running worker. Their new content then ends up in trusted pages that aren't sandboxed.
The sandbox no longer allows calling the constructor of Markup objects.
Severity
CWE
References
3 references
| URL | Tags |
|---|---|
| https://symfony.com/cve-2026-133770 | vendor-advisory |
| https://github.com/twigphp/Twig/security/advisori… | vendor-advisory |
| https://github.com/twigphp/Twig/commit/97b2e40b11… | patch |
Date Public
2026-11-24 12:58
{
"containers": {
"cna": {
"affected": [
{
"collectionURL": "https://packagist.org",
"defaultStatus": "unaffected",
"packageName": "twig/twig",
"product": "twig/twig",
"repo": "https://github.com/twigphp/Twig",
"vendor": "Twig",
"versions": [
{
"lessThan": "3.31.1",
"status": "affected",
"version": "0",
"versionType": "semver"
}
]
}
],
"credits": [
{
"lang": "en",
"type": "remediation developer",
"value": "Fabien Potencier"
}
],
"datePublic": "2026-11-24T12:58:46.000Z",
"descriptions": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/markdown",
"value": "The sandbox allows every method of `Twig\\Markup` objects, including their public constructor. A sandboxed template can therefore call `__construct()` on any `Markup` object that it reaches, and replace its content:\n\n```twig\n{% do banner.__construct(\u0027\u003cscript\u003ealert(1)\u003c/script\u003e\u0027, \u0027UTF-8\u0027) %}\n```\n\nA template gains nothing by rewriting its own output. The impact is on the `Markup` objects that come from the application and are also rendered elsewhere, like a global in a long-running worker. Their new content then ends up in trusted pages that aren\u0027t sandboxed.\n\nThe sandbox no longer allows calling the constructor of `Markup` objects."
}
],
"value": "The sandbox allows every method of Twig\\Markup objects, including their public constructor. A sandboxed template can therefore call __construct() on any Markup object that it reaches, and replace its content:\n\n{% do banner.__construct(\u0027\u003cscript\u003ealert(1)\u003c/script\u003e\u0027, \u0027UTF-8\u0027) %}\n\nA template gains nothing by rewriting its own output. The impact is on the Markup objects that come from the application and are also rendered elsewhere, like a global in a long-running worker. Their new content then ends up in trusted pages that aren\u0027t sandboxed.\n\nThe sandbox no longer allows calling the constructor of Markup objects."
}
],
"metrics": [
{
"cvssV4_0": {
"baseScore": 2.1,
"baseSeverity": "LOW",
"vectorString": "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:P/VC:N/VI:L/VA:N/SC:L/SI:L/SA:N",
"version": "4.0"
},
"format": "CVSS",
"scenarios": [
{
"lang": "en",
"value": "GENERAL"
}
]
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-79",
"description": "CWE-79 Improper Neutralization of Input During Web Page Generation",
"lang": "en",
"type": "CWE"
}
]
},
{
"descriptions": [
{
"cweId": "CWE-863",
"description": "CWE-863 Incorrect Authorization",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-11-24T13:07:53.166Z",
"orgId": "b5aa5c7f-767d-4597-9c64-3ac08b8711c6",
"shortName": "Symfony"
},
"references": [
{
"name": "CVE-2026-133770",
"tags": [
"vendor-advisory"
],
"url": "https://symfony.com/cve-2026-133770"
},
{
"name": "GHSA-r34x-hh9h-9q9c",
"tags": [
"vendor-advisory"
],
"url": "https://github.com/twigphp/Twig/security/advisories/GHSA-r34x-hh9h-9q9c"
},
{
"tags": [
"patch"
],
"url": "https://github.com/twigphp/Twig/commit/97b2e40b1165e6a42a197843f96ccb0a55f46f34"
}
],
"source": {
"advisory": "GHSA-r34x-hh9h-9q9c",
"discovery": "UNKNOWN"
},
"title": "Sandboxed templates can rewrite application-owned `Markup` objects through their constructor",
"x_generator": {
"engine": "symfony/ghsa-to-cve"
}
}
},
"cveMetadata": {
"assignerOrgId": "b5aa5c7f-767d-4597-9c64-3ac08b8711c6",
"assignerShortName": "Symfony",
"cveId": "CVE-2026-133770",
"datePublished": "2026-11-24T13:07:53.166Z",
"dateReserved": "2026-11-20T14:01:43.159Z",
"dateUpdated": "2026-11-24T13:07:53.166Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
CVE-2026-133768 (GCVE-0-2026-133768)
Vulnerability from cvelistv5 – Published: 2026-11-24 13:07 – Updated: 2026-11-24 13:07
VLAI
EPSS
VEX
Title
Sandbox property allow-list bypass via the `join` filter on non-iterable objects
Summary
The join filter converted a value that isn't iterable with (array) $value. For an object, that gives every property, including the private and protected ones. A sandboxed template allowed to use join could therefore print properties that the policy denies, and that templates can't read otherwise:
{{ user|join(',') }}
A value that isn't iterable is now joined as a single item. A Stringable object prints its checked string, and other objects throw, as with the first and last filters.
Severity
CWE
- CWE-863 - Incorrect Authorization
References
3 references
| URL | Tags |
|---|---|
| https://symfony.com/cve-2026-133768 | vendor-advisory |
| https://github.com/twigphp/Twig/security/advisori… | vendor-advisory |
| https://github.com/twigphp/Twig/commit/6bcede1346… | patch |
Date Public
2026-11-24 12:58
{
"containers": {
"cna": {
"affected": [
{
"collectionURL": "https://packagist.org",
"defaultStatus": "unaffected",
"packageName": "twig/twig",
"product": "twig/twig",
"repo": "https://github.com/twigphp/Twig",
"vendor": "Twig",
"versions": [
{
"lessThan": "3.31.1",
"status": "affected",
"version": "0",
"versionType": "semver"
}
]
}
],
"credits": [
{
"lang": "en",
"type": "remediation developer",
"value": "Fabien Potencier"
}
],
"datePublic": "2026-11-24T12:58:41.000Z",
"descriptions": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/markdown",
"value": "The `join` filter converted a value that isn\u0027t iterable with `(array) $value`. For an object, that gives every property, including the private and protected ones. A sandboxed template allowed to use `join` could therefore print properties that the policy denies, and that templates can\u0027t read otherwise:\n\n```twig\n{{ user|join(\u0027,\u0027) }}\n```\n\nA value that isn\u0027t iterable is now joined as a single item. A `Stringable` object prints its checked string, and other objects throw, as with the `first` and `last` filters."
}
],
"value": "The join filter converted a value that isn\u0027t iterable with (array) $value. For an object, that gives every property, including the private and protected ones. A sandboxed template allowed to use join could therefore print properties that the policy denies, and that templates can\u0027t read otherwise:\n\n{{ user|join(\u0027,\u0027) }}\n\nA value that isn\u0027t iterable is now joined as a single item. A Stringable object prints its checked string, and other objects throw, as with the first and last filters."
}
],
"metrics": [
{
"cvssV4_0": {
"baseScore": 5.3,
"baseSeverity": "MEDIUM",
"vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N",
"version": "4.0"
},
"format": "CVSS",
"scenarios": [
{
"lang": "en",
"value": "GENERAL"
}
]
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-863",
"description": "CWE-863 Incorrect Authorization",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-11-24T13:07:51.336Z",
"orgId": "b5aa5c7f-767d-4597-9c64-3ac08b8711c6",
"shortName": "Symfony"
},
"references": [
{
"name": "CVE-2026-133768",
"tags": [
"vendor-advisory"
],
"url": "https://symfony.com/cve-2026-133768"
},
{
"name": "GHSA-p2x6-ppf3-32r3",
"tags": [
"vendor-advisory"
],
"url": "https://github.com/twigphp/Twig/security/advisories/GHSA-p2x6-ppf3-32r3"
},
{
"tags": [
"patch"
],
"url": "https://github.com/twigphp/Twig/commit/6bcede134671133a4a056199af5cf4749d189d72"
}
],
"source": {
"advisory": "GHSA-p2x6-ppf3-32r3",
"discovery": "UNKNOWN"
},
"title": "Sandbox property allow-list bypass via the `join` filter on non-iterable objects",
"x_generator": {
"engine": "symfony/ghsa-to-cve"
}
}
},
"cveMetadata": {
"assignerOrgId": "b5aa5c7f-767d-4597-9c64-3ac08b8711c6",
"assignerShortName": "Symfony",
"cveId": "CVE-2026-133768",
"datePublished": "2026-11-24T13:07:51.336Z",
"dateReserved": "2026-11-20T14:01:43.159Z",
"dateUpdated": "2026-11-24T13:07:51.336Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
CVE-2026-133767 (GCVE-0-2026-133767)
Vulnerability from cvelistv5 – Published: 2026-11-24 13:07 – Updated: 2026-11-24 13:07
VLAI
EPSS
VEX
Title
Sandbox allow-list and `__toString()` bypass via a dynamic `embed` parent expression
Summary
When the parent of an embed tag was an expression other than a string or a variable, the sandbox didn't see that expression. The functions, filters and tests of the expression weren't checked against the policy, and neither were its conversions to strings. A sandboxed template allowed to use embed could therefore call any function, filter or test, and any __toString() method:
{% embed 'leak_' ~ app_secret() %}{% endembed %}
Method calls and property reads were not affected, since they're checked at runtime.
The sandbox now checks the parent expression of embed like any other expression of the template.
Severity
References
3 references
| URL | Tags |
|---|---|
| https://symfony.com/cve-2026-133767 | vendor-advisory |
| https://github.com/twigphp/Twig/security/advisori… | vendor-advisory |
| https://github.com/twigphp/Twig/commit/fe395ad247… | patch |
Date Public
2026-11-24 12:58
{
"containers": {
"cna": {
"affected": [
{
"collectionURL": "https://packagist.org",
"defaultStatus": "unaffected",
"packageName": "twig/twig",
"product": "twig/twig",
"repo": "https://github.com/twigphp/Twig",
"vendor": "Twig",
"versions": [
{
"lessThan": "3.31.1",
"status": "affected",
"version": "0",
"versionType": "semver"
}
]
}
],
"credits": [
{
"lang": "en",
"type": "finder",
"value": "Ivan Tse"
},
{
"lang": "en",
"type": "remediation developer",
"value": "Fabien Potencier"
}
],
"datePublic": "2026-11-24T12:58:38.000Z",
"descriptions": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/markdown",
"value": "When the parent of an `embed` tag was an expression other than a string or a variable, the sandbox didn\u0027t see that expression. The functions, filters and tests of the expression weren\u0027t checked against the policy, and neither were its conversions to strings. A sandboxed template allowed to use `embed` could therefore call any function, filter or test, and any `__toString()` method:\n\n```twig\n{% embed \u0027leak_\u0027 ~ app_secret() %}{% endembed %}\n```\n\nMethod calls and property reads were not affected, since they\u0027re checked at runtime.\n\nThe sandbox now checks the parent expression of `embed` like any other expression of the template."
}
],
"value": "When the parent of an embed tag was an expression other than a string or a variable, the sandbox didn\u0027t see that expression. The functions, filters and tests of the expression weren\u0027t checked against the policy, and neither were its conversions to strings. A sandboxed template allowed to use embed could therefore call any function, filter or test, and any __toString() method:\n\n{% embed \u0027leak_\u0027 ~ app_secret() %}{% endembed %}\n\nMethod calls and property reads were not affected, since they\u0027re checked at runtime.\n\nThe sandbox now checks the parent expression of embed like any other expression of the template."
}
],
"metrics": [
{
"cvssV4_0": {
"baseScore": 5.3,
"baseSeverity": "MEDIUM",
"vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N",
"version": "4.0"
},
"format": "CVSS",
"scenarios": [
{
"lang": "en",
"value": "GENERAL"
}
]
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-693",
"description": "CWE-693 Protection Mechanism Failure",
"lang": "en",
"type": "CWE"
}
]
},
{
"descriptions": [
{
"cweId": "CWE-863",
"description": "CWE-863 Incorrect Authorization",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-11-24T13:07:50.411Z",
"orgId": "b5aa5c7f-767d-4597-9c64-3ac08b8711c6",
"shortName": "Symfony"
},
"references": [
{
"name": "CVE-2026-133767",
"tags": [
"vendor-advisory"
],
"url": "https://symfony.com/cve-2026-133767"
},
{
"name": "GHSA-fmp9-6wxr-cfmq",
"tags": [
"vendor-advisory"
],
"url": "https://github.com/twigphp/Twig/security/advisories/GHSA-fmp9-6wxr-cfmq"
},
{
"tags": [
"patch"
],
"url": "https://github.com/twigphp/Twig/commit/fe395ad247b8e6c6f34f39bc211119ecb11f80b3"
}
],
"source": {
"advisory": "GHSA-fmp9-6wxr-cfmq",
"discovery": "UNKNOWN"
},
"title": "Sandbox allow-list and `__toString()` bypass via a dynamic `embed` parent expression",
"x_generator": {
"engine": "symfony/ghsa-to-cve"
}
}
},
"cveMetadata": {
"assignerOrgId": "b5aa5c7f-767d-4597-9c64-3ac08b8711c6",
"assignerShortName": "Symfony",
"cveId": "CVE-2026-133767",
"datePublished": "2026-11-24T13:07:50.411Z",
"dateReserved": "2026-11-20T14:01:43.158Z",
"dateUpdated": "2026-11-24T13:07:50.411Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
CVE-2026-133766 (GCVE-0-2026-133766)
Vulnerability from cvelistv5 – Published: 2026-11-24 13:07 – Updated: 2026-11-24 13:07
VLAI
EPSS
VEX
Title
Sandbox `__toString()` policy bypass via spread arguments
Summary
Since Twig 3.28.0, the sandbox skips the toString() check of an argument whose PHP parameter can't hold a string, like an int. A spread argument was mapped to a single parameter, although it fills every parameter from its position on. A sandboxed template could therefore call a denied toString() method:
{{ tag(...[1, obj]) }}
Here, the first parameter of tag() is an int, and a later one accepts strings. Applications are affected when they allow such a function, filter or test in the sandbox. No built-in callable is affected.
A spread argument is now checked unless every parameter that it can fill has a safe type.
Severity
References
3 references
| URL | Tags |
|---|---|
| https://symfony.com/cve-2026-133766 | vendor-advisory |
| https://github.com/twigphp/Twig/security/advisori… | vendor-advisory |
| https://github.com/twigphp/Twig/commit/7af821c372… | patch |
Impacted products
Date Public
2026-11-24 12:58
{
"containers": {
"cna": {
"affected": [
{
"collectionURL": "https://packagist.org",
"defaultStatus": "unaffected",
"packageName": "twig/twig",
"product": "twig/twig",
"repo": "https://github.com/twigphp/Twig",
"vendor": "Twig",
"versions": [
{
"lessThan": "3.31.1",
"status": "affected",
"version": "3.28.0",
"versionType": "semver"
}
]
}
],
"credits": [
{
"lang": "en",
"type": "finder",
"value": "Jacko"
},
{
"lang": "en",
"type": "remediation developer",
"value": "Nicolas Grekas"
}
],
"datePublic": "2026-11-24T12:58:35.000Z",
"descriptions": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/markdown",
"value": "Since Twig 3.28.0, the sandbox skips the `__toString()` check of an argument whose PHP parameter can\u0027t hold a string, like an `int`. A spread argument was mapped to a single parameter, although it fills every parameter from its position on. A sandboxed template could therefore call a denied `__toString()` method:\n\n```twig\n{{ tag(...[1, obj]) }}\n```\n\nHere, the first parameter of `tag()` is an `int`, and a later one accepts strings. Applications are affected when they allow such a function, filter or test in the sandbox. No built-in callable is affected.\n\nA spread argument is now checked unless every parameter that it can fill has a safe type."
}
],
"value": "Since Twig 3.28.0, the sandbox skips the toString() check of an argument whose PHP parameter can\u0027t hold a string, like an int. A spread argument was mapped to a single parameter, although it fills every parameter from its position on. A sandboxed template could therefore call a denied toString() method:\n\n{{ tag(...[1, obj]) }}\n\nHere, the first parameter of tag() is an int, and a later one accepts strings. Applications are affected when they allow such a function, filter or test in the sandbox. No built-in callable is affected.\n\nA spread argument is now checked unless every parameter that it can fill has a safe type."
}
],
"metrics": [
{
"cvssV4_0": {
"baseScore": 2.3,
"baseSeverity": "LOW",
"vectorString": "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N",
"version": "4.0"
},
"format": "CVSS",
"scenarios": [
{
"lang": "en",
"value": "GENERAL"
}
]
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-693",
"description": "CWE-693 Protection Mechanism Failure",
"lang": "en",
"type": "CWE"
}
]
},
{
"descriptions": [
{
"cweId": "CWE-863",
"description": "CWE-863 Incorrect Authorization",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-11-24T13:07:49.491Z",
"orgId": "b5aa5c7f-767d-4597-9c64-3ac08b8711c6",
"shortName": "Symfony"
},
"references": [
{
"name": "CVE-2026-133766",
"tags": [
"vendor-advisory"
],
"url": "https://symfony.com/cve-2026-133766"
},
{
"name": "GHSA-56wp-8m9q-4354",
"tags": [
"vendor-advisory"
],
"url": "https://github.com/twigphp/Twig/security/advisories/GHSA-56wp-8m9q-4354"
},
{
"tags": [
"patch"
],
"url": "https://github.com/twigphp/Twig/commit/7af821c372f52cc9447afeba9e042de44b738222"
}
],
"source": {
"advisory": "GHSA-56wp-8m9q-4354",
"discovery": "UNKNOWN"
},
"title": "Sandbox `__toString()` policy bypass via spread arguments",
"x_generator": {
"engine": "symfony/ghsa-to-cve"
}
}
},
"cveMetadata": {
"assignerOrgId": "b5aa5c7f-767d-4597-9c64-3ac08b8711c6",
"assignerShortName": "Symfony",
"cveId": "CVE-2026-133766",
"datePublished": "2026-11-24T13:07:49.491Z",
"dateReserved": "2026-11-20T14:01:43.158Z",
"dateUpdated": "2026-11-24T13:07:49.491Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
CVE-2026-133765 (GCVE-0-2026-133765)
Vulnerability from cvelistv5 – Published: 2026-11-24 13:07 – Updated: 2026-11-24 13:07
VLAI
EPSS
VEX
Title
Sandbox `__toString()` policy bypass via assignment and destructuring expressions
Summary
The sandbox checks that a template may call toString() on an object before converting it to a string. Since Twig 3.23.0, assignments like x = obj, and the destructuring forms [a] = list and {a} = obj, evaluate to the value that they assign. The sandbox didn't check that value, so a sandboxed template could call a denied toString() method:
{{ (x = obj) }}
{{ ({secret: s} = obj)|join }}
No tag needs to be allowed.
The sandbox now checks the result of assignments like the result of filters and functions. {% do x = obj %} and {% if (x = obj) %} still work, since they don't convert the value to a string.
Severity
References
3 references
| URL | Tags |
|---|---|
| https://symfony.com/cve-2026-133765 | vendor-advisory |
| https://github.com/twigphp/Twig/security/advisori… | vendor-advisory |
| https://github.com/twigphp/Twig/commit/6bcdbc3d44… | patch |
Impacted products
Date Public
2026-11-24 12:58
{
"containers": {
"cna": {
"affected": [
{
"collectionURL": "https://packagist.org",
"defaultStatus": "unaffected",
"packageName": "twig/twig",
"product": "twig/twig",
"repo": "https://github.com/twigphp/Twig",
"vendor": "Twig",
"versions": [
{
"lessThan": "3.31.1",
"status": "affected",
"version": "3.23.0",
"versionType": "semver"
}
]
}
],
"credits": [
{
"lang": "en",
"type": "remediation developer",
"value": "Fabien Potencier"
},
{
"lang": "en",
"type": "finder",
"value": "Jacko"
},
{
"lang": "en",
"type": "finder",
"value": "Inanna Malick"
},
{
"lang": "en",
"type": "finder",
"value": "Tudor-Andrei Oprea"
}
],
"datePublic": "2026-11-24T12:58:32.000Z",
"descriptions": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/markdown",
"value": "The sandbox checks that a template may call `__toString()` on an object before converting it to a string. Since Twig 3.23.0, assignments like `x = obj`, and the destructuring forms `[a] = list` and `{a} = obj`, evaluate to the value that they assign. The sandbox didn\u0027t check that value, so a sandboxed template could call a denied `__toString()` method:\n\n```twig\n{{ (x = obj) }}\n{{ ({secret: s} = obj)|join }}\n```\n\nNo tag needs to be allowed.\n\nThe sandbox now checks the result of assignments like the result of filters and functions. `{% do x = obj %}` and `{% if (x = obj) %}` still work, since they don\u0027t convert the value to a string."
}
],
"value": "The sandbox checks that a template may call toString() on an object before converting it to a string. Since Twig 3.23.0, assignments like x = obj, and the destructuring forms [a] = list and {a} = obj, evaluate to the value that they assign. The sandbox didn\u0027t check that value, so a sandboxed template could call a denied toString() method:\n\n{{ (x = obj) }}\n{{ ({secret: s} = obj)|join }}\n\nNo tag needs to be allowed.\n\nThe sandbox now checks the result of assignments like the result of filters and functions. {% do x = obj %} and {% if (x = obj) %} still work, since they don\u0027t convert the value to a string."
}
],
"metrics": [
{
"cvssV4_0": {
"baseScore": 5.3,
"baseSeverity": "MEDIUM",
"vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N",
"version": "4.0"
},
"format": "CVSS",
"scenarios": [
{
"lang": "en",
"value": "GENERAL"
}
]
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-693",
"description": "CWE-693 Protection Mechanism Failure",
"lang": "en",
"type": "CWE"
}
]
},
{
"descriptions": [
{
"cweId": "CWE-863",
"description": "CWE-863 Incorrect Authorization",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-11-24T13:07:48.546Z",
"orgId": "b5aa5c7f-767d-4597-9c64-3ac08b8711c6",
"shortName": "Symfony"
},
"references": [
{
"name": "CVE-2026-133765",
"tags": [
"vendor-advisory"
],
"url": "https://symfony.com/cve-2026-133765"
},
{
"name": "GHSA-ccrc-gqhf-3cxc",
"tags": [
"vendor-advisory"
],
"url": "https://github.com/twigphp/Twig/security/advisories/GHSA-ccrc-gqhf-3cxc"
},
{
"tags": [
"patch"
],
"url": "https://github.com/twigphp/Twig/commit/6bcdbc3d4470dde23e3e2636e7053e0512387edd"
}
],
"source": {
"advisory": "GHSA-ccrc-gqhf-3cxc",
"discovery": "UNKNOWN"
},
"title": "Sandbox `__toString()` policy bypass via assignment and destructuring expressions",
"x_generator": {
"engine": "symfony/ghsa-to-cve"
}
}
},
"cveMetadata": {
"assignerOrgId": "b5aa5c7f-767d-4597-9c64-3ac08b8711c6",
"assignerShortName": "Symfony",
"cveId": "CVE-2026-133765",
"datePublished": "2026-11-24T13:07:48.546Z",
"dateReserved": "2026-11-20T14:01:43.158Z",
"dateUpdated": "2026-11-24T13:07:48.546Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
CVE-2026-133764 (GCVE-0-2026-133764)
Vulnerability from cvelistv5 – Published: 2026-11-24 13:07 – Updated: 2026-11-24 13:07
VLAI
EPSS
VEX
Title
Sandbox `__toString()` policy bypass via the input of custom tests
Summary
The sandbox checks that a template may call toString() on an object before converting it to a string. It didn't check the input of tests. The PHP callable of a test may convert this input to a string, for example when its parameter is typed as string. PHP then calls toString() on an object without the sandbox checking it first:
{{ obj is upperish }}
Applications are affected when they register such a test and allow it in the sandbox. No built-in test is affected.
The sandbox now checks the input of tests like the input of filters. The built-in tests that never convert their input to a string still skip the check.
Severity
References
3 references
| URL | Tags |
|---|---|
| https://symfony.com/cve-2026-133764 | vendor-advisory |
| https://github.com/twigphp/Twig/security/advisori… | vendor-advisory |
| https://github.com/twigphp/Twig/commit/978c60be74… | patch |
Date Public
2026-11-24 12:58
{
"containers": {
"cna": {
"affected": [
{
"collectionURL": "https://packagist.org",
"defaultStatus": "unaffected",
"packageName": "twig/twig",
"product": "twig/twig",
"repo": "https://github.com/twigphp/Twig",
"vendor": "Twig",
"versions": [
{
"lessThan": "3.31.1",
"status": "affected",
"version": "0",
"versionType": "semver"
}
]
}
],
"credits": [
{
"lang": "en",
"type": "finder",
"value": "Arpit Jain"
},
{
"lang": "en",
"type": "remediation developer",
"value": "Fabien Potencier"
}
],
"datePublic": "2026-11-24T12:58:30.000Z",
"descriptions": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/markdown",
"value": "The sandbox checks that a template may call `__toString()` on an object before converting it to a string. It didn\u0027t check the input of tests. The PHP callable of a test may convert this input to a string, for example when its parameter is typed as `string`. PHP then calls `__toString()` on an object without the sandbox checking it first:\n\n```twig\n{{ obj is upperish }}\n```\n\nApplications are affected when they register such a test and allow it in the sandbox. No built-in test is affected.\n\nThe sandbox now checks the input of tests like the input of filters. The built-in tests that never convert their input to a string still skip the check."
}
],
"value": "The sandbox checks that a template may call toString() on an object before converting it to a string. It didn\u0027t check the input of tests. The PHP callable of a test may convert this input to a string, for example when its parameter is typed as string. PHP then calls toString() on an object without the sandbox checking it first:\n\n{{ obj is upperish }}\n\nApplications are affected when they register such a test and allow it in the sandbox. No built-in test is affected.\n\nThe sandbox now checks the input of tests like the input of filters. The built-in tests that never convert their input to a string still skip the check."
}
],
"metrics": [
{
"cvssV4_0": {
"baseScore": 2.3,
"baseSeverity": "LOW",
"vectorString": "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N",
"version": "4.0"
},
"format": "CVSS",
"scenarios": [
{
"lang": "en",
"value": "GENERAL"
}
]
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-693",
"description": "CWE-693 Protection Mechanism Failure",
"lang": "en",
"type": "CWE"
}
]
},
{
"descriptions": [
{
"cweId": "CWE-863",
"description": "CWE-863 Incorrect Authorization",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-11-24T13:07:47.621Z",
"orgId": "b5aa5c7f-767d-4597-9c64-3ac08b8711c6",
"shortName": "Symfony"
},
"references": [
{
"name": "CVE-2026-133764",
"tags": [
"vendor-advisory"
],
"url": "https://symfony.com/cve-2026-133764"
},
{
"name": "GHSA-rc9g-xwx4-rmfh",
"tags": [
"vendor-advisory"
],
"url": "https://github.com/twigphp/Twig/security/advisories/GHSA-rc9g-xwx4-rmfh"
},
{
"tags": [
"patch"
],
"url": "https://github.com/twigphp/Twig/commit/978c60be74fc62a0f2c3af11ca5bc3609ae8b69a"
}
],
"source": {
"advisory": "GHSA-rc9g-xwx4-rmfh",
"discovery": "UNKNOWN"
},
"title": "Sandbox `__toString()` policy bypass via the input of custom tests",
"x_generator": {
"engine": "symfony/ghsa-to-cve"
}
}
},
"cveMetadata": {
"assignerOrgId": "b5aa5c7f-767d-4597-9c64-3ac08b8711c6",
"assignerShortName": "Symfony",
"cveId": "CVE-2026-133764",
"datePublished": "2026-11-24T13:07:47.621Z",
"dateReserved": "2026-11-20T14:01:43.158Z",
"dateUpdated": "2026-11-24T13:07:47.621Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
CVE-2026-133763 (GCVE-0-2026-133763)
Vulnerability from cvelistv5 – Published: 2026-11-24 13:07 – Updated: 2026-11-24 13:07
VLAI
EPSS
VEX
Title
Sandbox `__toString()` policy bypass via the `is true` test
Summary
The sandbox checks that a template may call toString() on an object before converting it to a string. For an object, the is true test evaluates to the object itself, and that result wasn't checked. A sandboxed template could therefore print an object through a denied toString() method:
{{ obj is true }}
The same applies when the result is concatenated or passed to a filter. No tag needs to be allowed. A test in a boolean context, like {% if obj is true %}, isn't affected, since it doesn't convert the object to a string.
The sandbox now checks the result of tests like the result of filters and functions.
Severity
References
3 references
| URL | Tags |
|---|---|
| https://symfony.com/cve-2026-133763 | vendor-advisory |
| https://github.com/twigphp/Twig/security/advisori… | vendor-advisory |
| https://github.com/twigphp/Twig/commit/a41bd2dd46… | patch |
Impacted products
Date Public
2026-11-24 12:58
{
"containers": {
"cna": {
"affected": [
{
"collectionURL": "https://packagist.org",
"defaultStatus": "unaffected",
"packageName": "twig/twig",
"product": "twig/twig",
"repo": "https://github.com/twigphp/Twig",
"vendor": "Twig",
"versions": [
{
"lessThan": "3.31.1",
"status": "affected",
"version": "3.21.0",
"versionType": "semver"
}
]
}
],
"credits": [
{
"lang": "en",
"type": "finder",
"value": "Eric Labrador Sainz"
},
{
"lang": "en",
"type": "finder",
"value": "Jacko"
},
{
"lang": "en",
"type": "finder",
"value": "Inanna Malick"
},
{
"lang": "en",
"type": "remediation developer",
"value": "Fabien Potencier"
}
],
"datePublic": "2026-11-24T12:58:27.000Z",
"descriptions": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/markdown",
"value": "The sandbox checks that a template may call `__toString()` on an object before converting it to a string. For an object, the `is true` test evaluates to the object itself, and that result wasn\u0027t checked. A sandboxed template could therefore print an object through a denied `__toString()` method:\n\n```twig\n{{ obj is true }}\n```\n\nThe same applies when the result is concatenated or passed to a filter. No tag needs to be allowed. A test in a boolean context, like `{% if obj is true %}`, isn\u0027t affected, since it doesn\u0027t convert the object to a string.\n\nThe sandbox now checks the result of tests like the result of filters and functions."
}
],
"value": "The sandbox checks that a template may call toString() on an object before converting it to a string. For an object, the is true test evaluates to the object itself, and that result wasn\u0027t checked. A sandboxed template could therefore print an object through a denied toString() method:\n\n{{ obj is true }}\n\nThe same applies when the result is concatenated or passed to a filter. No tag needs to be allowed. A test in a boolean context, like {% if obj is true %}, isn\u0027t affected, since it doesn\u0027t convert the object to a string.\n\nThe sandbox now checks the result of tests like the result of filters and functions."
}
],
"metrics": [
{
"cvssV4_0": {
"baseScore": 5.3,
"baseSeverity": "MEDIUM",
"vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N",
"version": "4.0"
},
"format": "CVSS",
"scenarios": [
{
"lang": "en",
"value": "GENERAL"
}
]
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-693",
"description": "CWE-693 Protection Mechanism Failure",
"lang": "en",
"type": "CWE"
}
]
},
{
"descriptions": [
{
"cweId": "CWE-863",
"description": "CWE-863 Incorrect Authorization",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-11-24T13:07:46.698Z",
"orgId": "b5aa5c7f-767d-4597-9c64-3ac08b8711c6",
"shortName": "Symfony"
},
"references": [
{
"name": "CVE-2026-133763",
"tags": [
"vendor-advisory"
],
"url": "https://symfony.com/cve-2026-133763"
},
{
"name": "GHSA-567w-cx2v-jc85",
"tags": [
"vendor-advisory"
],
"url": "https://github.com/twigphp/Twig/security/advisories/GHSA-567w-cx2v-jc85"
},
{
"tags": [
"patch"
],
"url": "https://github.com/twigphp/Twig/commit/a41bd2dd466d771cc384b9730be6190eb5a4f4d0"
}
],
"source": {
"advisory": "GHSA-567w-cx2v-jc85",
"discovery": "UNKNOWN"
},
"title": "Sandbox `__toString()` policy bypass via the `is true` test",
"x_generator": {
"engine": "symfony/ghsa-to-cve"
}
}
},
"cveMetadata": {
"assignerOrgId": "b5aa5c7f-767d-4597-9c64-3ac08b8711c6",
"assignerShortName": "Symfony",
"cveId": "CVE-2026-133763",
"datePublished": "2026-11-24T13:07:46.698Z",
"dateReserved": "2026-11-20T14:01:43.158Z",
"dateUpdated": "2026-11-24T13:07:46.698Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}