---
title: "Twig twig/twig vulnerabilities and CVEs"
url: https://radicalnotion.ai/vendor/twig/twig-twig
type: product
description: "Twig twig/twig has 31 published CVEs, 0 in CISA KEV and 1 with public exploits."
updated: 2026-11-24
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# Twig twig/twig vulnerabilities

Vendor: [Twig](https://radicalnotion.ai/vendor/twig)

- **Published CVEs:** 31
- **In CISA KEV:** 0
- **With a public exploit:** 1
- **With a patch:** 31
- **Average CVSS:** 5.6
- **First CVE:** 2015-11-06
- **Latest CVE:** 2026-11-24
- **Ecosystems:** composer

## Severity breakdown

| Severity | CVEs |
| --- | --- |
| Critical | 2 |
| High | 9 |
| Medium | 12 |
| Low | 8 |
| Unscored | 0 |

## Most common weakness types

| CWE | Name | CVEs |
| --- | --- | --- |
| [CWE-693](https://radicalnotion.ai/cwe/cwe-693) | Protection Mechanism Failure | 14 |
| [CWE-863](https://radicalnotion.ai/cwe/cwe-863) | Incorrect Authorization | 4 |
| [CWE-79](https://radicalnotion.ai/cwe/cwe-79) | Improper Neutralization of Input During Web Page Generation | 3 |
| [CWE-94](https://radicalnotion.ai/cwe/cwe-94) | Improper Control of Generation of Code | 2 |
| [CWE-668](https://radicalnotion.ai/cwe/cwe-668) | Exposure of Resource to Wrong Sphere | 2 |
| [CWE-74](https://radicalnotion.ai/cwe/cwe-74) | Improper Neutralization of Special Elements in Output Used by a Downstream Component | 2 |
| [CWE-116](https://radicalnotion.ai/cwe/cwe-116) | Improper Encoding or Escaping of Output | 1 |
| [CWE-22](https://radicalnotion.ai/cwe/cwe-22) | Improper Limitation of a Pathname to a Restricted Directory | 1 |

## CVEs by year

| Year | CVEs published |
| --- | --- |
| 2015 | 1 |
| 2016 | 0 |
| 2017 | 0 |
| 2018 | 0 |
| 2019 | 1 |
| 2020 | 0 |
| 2021 | 0 |
| 2022 | 2 |
| 2023 | 0 |
| 2024 | 3 |
| 2025 | 1 |
| 2026 | 23 |

## Affected versions (top 12 of 29)

| Version | Kind | CVEs |
| --- | --- | --- |
| \< 3.27.0 | range | 5 |
| \< 3.26.0 | range | 4 |
| \< 3.31.1 | range | 4 |
| \< 3.11.2 | range | 2 |
| 3.12 \<= v \< 3.14.1 | range | 2 |
| 3.9.0 \<= v \< 3.26.0 | range | 2 |
| \< 1.20.0 | range | 1 |
| \< 1.38.0 | range | 1 |
| \< 3.31.0 | range | 1 |
| 1.0.0 \<= v \< 1.44.7 | range | 1 |
| 1.0.0 \<= v \< 1.44.8 | range | 1 |
| 1.15.1 \<= v \< 3.26.0 | range | 1 |

## Fixed in (top 12 of 19)

| Version | CVEs |
| --- | --- |
| 3.26.0 | 10 |
| 3.31.1 | 7 |
| 3.27.0 | 5 |
| 3.11.2 | 2 |
| 3.14.1 | 2 |
| 3.31.0 | 2 |
| 1.20.0 | 1 |
| 1.38.0 | 1 |
| 1.44.7 | 1 |
| 1.44.8 | 1 |
| 2.14.11 | 1 |
| 2.15.3 | 1 |

## CVEs (first 30 of 31, most severe first)

| CVE | Title | Severity | CVSS | CISA KEV | Public exploit | Patch |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2026-133772 | Sandbox Tag Allow-List Bypass via the Branch of a \`guard\` Tag That Isn't Selected | low | 2.3 | No | No | Yes |
| CVE-2026-133771 | Missing autoescaping for a variable named like a macro import alias of another scope | low | 2.3 | No | No | Yes |
| CVE-2026-133770 | Sandboxed templates can rewrite application-owned \`Markup\` objects through their constructor | low | 2.1 | No | No | Yes |
| CVE-2026-133768 | Sandbox property allow-list bypass via the \`join\` filter on non-iterable objects | medium | 5.3 | No | No | Yes |
| CVE-2026-133767 | Sandbox allow-list and \`\_\_toString()\` bypass via a dynamic \`embed\` parent expression | medium | 5.3 | No | No | Yes |
| CVE-2026-133766 | Sandbox \`\_\_toString()\` policy bypass via spread arguments | low | 2.3 | No | No | Yes |
| CVE-2026-133765 | Sandbox \`\_\_toString()\` policy bypass via assignment and destructuring expressions | medium | 5.3 | No | No | Yes |
| CVE-2026-133764 | Sandbox \`\_\_toString()\` policy bypass via the input of custom tests | low | 2.3 | No | No | Yes |
| CVE-2026-133763 | Sandbox \`\_\_toString()\` policy bypass via the \`is true\` test | medium | 5.3 | No | No | Yes |
| CVE-2026-48807 | Twig: Sandbox \`\_\_toString()\` policy bypass via \`Traversable\` in \`join\` and \`replace\` filters | high | 7.1 | No | No | Yes |
| CVE-2026-48806 | Twig: Sandbox \`\_\_toString()\` policy bypass via dynamic mapping keys | high | 7.1 | No | No | Yes |
| CVE-2026-48808 | Twig: Sandbox property allowlist bypass via the \`column\` filter under \`SourcePolicyInterface\` | medium | 6.0 | No | No | Yes |
| CVE-2026-48805 | Twig: Sandbox state regression in deprecated internal wrappers in \`src/Resources/core.php\` | medium | 5.3 | No | No | Yes |
| CVE-2026-46638 | Twig: \`{% sandbox %}{% include %}\` skips checkSecurity() on cached templates (incomplete fix for CVE-2024-45411) | medium | 6.0 | No | No | Yes |
| CVE-2026-46640 | Twig: Arbitrary PHP code execution via \`\_self.( )\` macro-reference compilation | high | 8.7 | No | No | Yes |
| CVE-2026-47730 | Twig: XSS in profiler HtmlDumper via unescaped template and profile names | medium | 5.1 | No | No | Yes |
| CVE-2026-46628 | Twig: The \`spaceless\` filter implicitly marks its output as safe | medium | 5.1 | No | Yes | Yes |
| CVE-2026-46634 | Twig: \`template\_from\_string()\` escapes a SourcePolicy-driven sandbox via synthesized template name | high | 7.7 | No | No | Yes |
| CVE-2026-46633 | Twig: PHP code injection via \`{% use %}\` template name | critical | 9.3 | No | No | Yes |
| CVE-2026-46639 | Twig: Sandbox property and method bypass via object-destructuring assignment | high | 8.7 | No | No | Yes |
| CVE-2026-46635 | Twig: Sandbox property allowlist bypass via the \`column\` filter (array\_column on objects) | medium | 5.3 | No | No | Yes |
| CVE-2026-47732 | Twig Sandbox: multiple \`\_\_toString()\` policy bypasses via unguarded string coercion points | high | 7.1 | No | No | Yes |
| CVE-2026-24425 | Twig 2.16.x & 3.9.0-3.25.x Sandbox Bypass via SourcePolicyInterface | high | 8.7 | No | No | Yes |
| CVE-2025-24374 | Twig fixes a security issue where escaping was missing when using null coalesce operator (??) | medium | 4.3 | No | No | Yes |
| CVE-2024-51754 | Unguarded calls to \_\_toString() when nesting an object into an array in Twig | low | 2.1 | No | No | Yes |
| CVE-2024-51755 | Unguarded calls to \_\_isset() and to array-accesses when the sandbox is enabled in Twig | low | 2.1 | No | No | Yes |
| CVE-2024-45411 | Twig has a possible sandbox bypass | medium | 5.8 | No | No | Yes |
| CVE-2022-39261 | Twig may load a template outside a configured directory when using the filesystem loader | high | 7.5 | No | No | Yes |
| CVE-2022-23614 | Code injection in Twig | critical | 9.8 | No | No | Yes |
| CVE-2019-9942 | Twig Sandbox Information Disclosure | low | 3.7 | No | No | Yes |

## Frequently asked questions

### How many CVEs does Twig twig/twig have?

Twig twig/twig has 31 published CVE records since 2015.

### How many Twig twig/twig CVEs are in CISA KEV?

None of Twig twig/twig's CVEs are currently listed in CISA's Known Exploited Vulnerabilities catalog.

### Are there public exploits for Twig twig/twig vulnerabilities?

Yes — 1 of Twig twig/twig's CVEs have a known public exploit.

### Which versions of Twig twig/twig are affected?

48 distinct Twig twig/twig versions are named across its CVEs. Use the version filter above to see the CVEs affecting a specific version.

### What are the most common weakness types in Twig twig/twig CVEs?

Twig twig/twig's CVEs most often map to these CWE weakness types: CWE-693 (Protection Mechanism Failure), CWE-863 (Incorrect Authorization), CWE-79 (Improper Neutralization of Input During Web Page Generation), CWE-94 (Improper Control of Generation of Code).

### How many critical Twig twig/twig vulnerabilities are there?

Twig twig/twig has 2 critical and 9 high-severity CVEs.

### What is the average severity of Twig twig/twig CVEs?

The average CVSS base score across Twig twig/twig's scored CVEs is 5.6.

## Other products from this vendor

- [twig/markdown-extra](https://radicalnotion.ai/vendor/twig/twig-markdown-extra) (2 CVEs)
- [cssinliner-extra](https://radicalnotion.ai/vendor/twig/cssinliner-extra) (1 CVEs)
- [markdown-extra](https://radicalnotion.ai/vendor/twig/markdown-extra) (1 CVEs)
- [twig/cssinliner-extra](https://radicalnotion.ai/vendor/twig/twig-cssinliner-extra) (1 CVEs)
- [twig/html-extra](https://radicalnotion.ai/vendor/twig/twig-html-extra) (1 CVEs)
- [twig/intl-extra](https://radicalnotion.ai/vendor/twig/twig-intl-extra) (1 CVEs)

---

Source: [RadicalNotion.AI](https://radicalnotion.ai/vendor/twig/twig-twig). Licensed CC BY-NC 4.0; attribute RadicalNotion.AI and link the source page when you reuse this data.
