# Twig has a possible sandbox bypass

Advisory record · `GHSA-6j75-5wfj-gh66`

- **Identifiers:** `GHSA-6j75-5wfj-gh66` · `CVE-2024-45411` · `PKSA-6319-ffpf-gx66`
- **State:** Confirmed
- **Severity:** CVSS 8.6 High
- **Critical:** No
- **Weakness (CWE):** [CWE-693](https://cwe.mitre.org/data/definitions/693.html)
- **Tags:** [CWE-693](https://agentprime.io/advisories/tag/cwe-693.md)
- **Published:** 9 Sept 2024
- **Updated:** 10 Oct 2024
- **Reviewed by a person:** No

Published by the GitHub Advisory Database at 9 Sept 2024, 20:19 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

## Affected packages

- `twig/twig` (Packagist): affected `>=1.0.0, <1.44.8 || >=2.0.0, <2.16.1 || >=3.12.0, <3.14.0 || >=3.0.0, <3.11.1`; fixed in `1.44.8`, `2.16.1`, `3.14.0`, `3.11.1`

## Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

> Twig versions from 1.0.0 before 1.44.8, from 2.0.0 before 2.16.1, from 3.0.0 before 3.11.1, and from 3.12.0 before 3.14.0 contain a sandbox bypass. An attacker who can supply user-contributed templates could get past the sandbox restrictions, but only when the sandbox is disabled globally, the sandboxed include() call uses a template name, and that template was already loaded earlier outside the sandbox. Upgrade to 1.44.8, 2.16.1, 3.11.1, or 3.14.0 depending on your branch.

Written 4 Nov 2026.

## Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

## Severity and exploitation

- 8.6 High, CVSS 3.1: `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H`, from CNA (GitHub_M)

- **CISA KEV:** Not listed.
- **EPSS:** 0.0085, the 58th percentile, on 12 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

- 9 Sept 2024, 17:57 UTC: [Published by the maintainers as a GitHub repository advisory](https://github.com/twigphp/Twig/security/advisories/GHSA-6j75-5wfj-gh66)
- 31 Oct 2026, 14:29 UTC: First seen by agentprime
- 31 Oct 2026, 14:29 UTC: [Confirmed by OSV](https://osv.dev/vulnerability/GHSA-6j75-5wfj-gh66)

## Sources

- [GitHub Advisory Database: GHSA-6j75-5wfj-gh66](https://github.com/advisories/GHSA-6j75-5wfj-gh66)
- [OSV: GHSA-6j75-5wfj-gh66](https://osv.dev/vulnerability/GHSA-6j75-5wfj-gh66)
- <https://github.com/twigphp/Twig/security/advisories/GHSA-6j75-5wfj-gh66>
- <https://nvd.nist.gov/vuln/detail/CVE-2024-45411>
- <https://github.com/twigphp/Twig/commit/11f68e2aeb526bfaf638e30d4420d8a710f3f7c6>
- <https://github.com/twigphp/Twig/commit/2102dd135986db79192d26fb5f5817a566e0a7de>
- <https://github.com/twigphp/Twig/commit/41103dcdc2daab4c83cdd05b5b4fde5b7e41e635>
- <https://github.com/twigphp/Twig/commit/7afa198603de49d147e90d18062e7b9addcf5233>
- <https://github.com/FriendsOfPHP/security-advisories/blob/master/twig/twig/CVE-2024-45411.yaml>
- <https://github.com/twigphp/Twig>
- <https://symfony.com/blog/twig-security-release-possible-sandbox-bypass>

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.

## Check whether this affects you

A Match means an installed version is in the affected range above. Most don’t affect the app; agentprime hasn’t analysed this one yet.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), ask your agent to check the project: `check_lockfile` sends a lockfile, `check_packages` a list of installed packages, and both return the Matches and the upgrades that clear them. `get_advisory` returns this record. Setup: <https://agentprime.io/mcp.md>
- In a browser: <https://agentprime.io/check/> reads your lockfile in the browser, never uploading it.
- Whether it touches your code, with file and line: the Claude Code plugin, <https://agentprime.io/plugin.md>
- As JSON: <https://api.agentprime.io/v1/advisories/GHSA-6j75-5wfj-gh66>, or `POST https://api.agentprime.io/v1/match` with your packages (<https://agentprime.io/api.md>)

---

The web page: <https://agentprime.io/advisories/GHSA-6j75-5wfj-gh66/>. Everything for agents: <https://agentprime.io/llms.txt>.
