
CVE catalog
CVE-2024-51754
Twig vulnerabilities
- Severity
- Medium
- Published
- Source
- [NVD] · [CVE record]
- EPSS
- 0.43% · Oct 25, 2026
Twig is a template language for PHP. In a sandbox, an attacker can call `__toString()` on an object even if the `__toString()` method is not allowed by the security policy when the object is part of an array or an argument list (arguments to a function or a filter for instance). This issue has been patched in versions 3.11.2 and 3.14.1. All users are advised to upgrade. There are no known workarounds for this issue.
Vulnerable and fixed packages
Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.
| Distribution | Package | Release | Version | Status |
|---|---|---|---|---|
| Debian | php-twig | sid | 3.28.0-1 | fixed |
| Debian | php-twig | forky | 3.28.0-1 | fixed |
| Debian | php-twig | trixie | 3.27.0-0+deb13u1 | fixed |
| Debian | php-twig | trixie-security | 3.27.0-0+deb13u1 | fixed |
| Debian | php-twig | bookworm | 3.5.1-1+deb12u3 | fixed |
| Debian | php-twig | bookworm-security | 3.5.1-1+deb12u3 | fixed |
| Ubuntu | php-twig | noble | Not reported | vulnerable |
| Ubuntu | php-twig | noble | 3.8.0-2ubuntu0.1~esm1 | fixed |
| Ubuntu | php-twig-cache-extra | noble | 3.8.0-2ubuntu0.1~esm1 | fixed |
| Ubuntu | php-twig-cssinliner-extra | noble | 3.8.0-2ubuntu0.1~esm1 | fixed |
| Ubuntu | php-twig-doc | noble | 3.8.0-2ubuntu0.1~esm1 | fixed |
| Ubuntu | php-twig-extra-bundle | noble | 3.8.0-2ubuntu0.1~esm1 | fixed |
| Ubuntu | php-twig-html-extra | noble | 3.8.0-2ubuntu0.1~esm1 | fixed |
| Ubuntu | php-twig-inky-extra | noble | 3.8.0-2ubuntu0.1~esm1 | fixed |
| Ubuntu | php-twig-intl-extra | noble | 3.8.0-2ubuntu0.1~esm1 | fixed |
| Ubuntu | php-twig-markdown-extra | noble | 3.8.0-2ubuntu0.1~esm1 | fixed |
| Ubuntu | php-twig-string-extra | noble | 3.8.0-2ubuntu0.1~esm1 | fixed |
| Ubuntu | twig | pro | 1.24.0-2ubuntu1 | vulnerable |
| Ubuntu | twig | pro | 2.4.4-2ubuntu1 | vulnerable |
| Ubuntu | twig | pro | 2.4.6-1 | vulnerable |
| Ubuntu | twig | pro | 2.4.6-1ubuntu0.1~esm1 | vulnerable |
| Ubuntu | php-twig | pro | 3.7.0-1 | vulnerable |
| Ubuntu | php-twig | pro | 3.7.1-1 | vulnerable |
| Ubuntu | php-twig | pro | 3.8.0-2 | vulnerable |
| Ubuntu | php-twig | pro | 3.8.0-2ubuntu0.1~esm1 | fixed |
Fixed-version evidence
| Distribution | Package | Type | Release | Fixed version | Urgency | Origin | Bugs |
|---|---|---|---|---|---|---|---|
| Debian | php-twig | source | sid | 3.14.2-1 | not yet assigned | Not reported | [1086884] |
| Debian | php-twig | source | forky | 3.14.2-1 | not yet assigned | Not reported | [1086884] |
| Debian | php-twig | source | trixie | 3.14.2-1 | not yet assigned | Not reported | [1086884] |
| Debian | php-twig | source | bookworm | 3.5.1-1+deb12u3 | not yet assigned | Not reported | [1086884] |
| Ubuntu | php-twig | deb | noble | 3.8.0-2ubuntu0.1~esm1 | Not reported | Not reported | Not reported |
| Ubuntu | php-twig-cache-extra | deb | noble | 3.8.0-2ubuntu0.1~esm1 | Not reported | Not reported | Not reported |
| Ubuntu | php-twig-cssinliner-extra | deb | noble | 3.8.0-2ubuntu0.1~esm1 | Not reported | Not reported | Not reported |
| Ubuntu | php-twig-doc | deb | noble | 3.8.0-2ubuntu0.1~esm1 | Not reported | Not reported | Not reported |
| Ubuntu | php-twig-extra-bundle | deb | noble | 3.8.0-2ubuntu0.1~esm1 | Not reported | Not reported | Not reported |
| Ubuntu | php-twig-html-extra | deb | noble | 3.8.0-2ubuntu0.1~esm1 | Not reported | Not reported | Not reported |
| Ubuntu | php-twig-inky-extra | deb | noble | 3.8.0-2ubuntu0.1~esm1 | Not reported | Not reported | Not reported |
| Ubuntu | php-twig-intl-extra | deb | noble | 3.8.0-2ubuntu0.1~esm1 | Not reported | Not reported | Not reported |
| Ubuntu | php-twig-markdown-extra | deb | noble | 3.8.0-2ubuntu0.1~esm1 | Not reported | Not reported | Not reported |
| Ubuntu | php-twig-string-extra | deb | noble | 3.8.0-2ubuntu0.1~esm1 | Not reported | Not reported | Not reported |
| Ubuntu | php-twig | deb | pro | 3.8.0-2ubuntu0.1~esm1 | Not reported | UBUNTU-CVE-2024-51754 | Not reported |
OpenFactory catalog packages
[Debian 12 (Bookworm)]
- [php-twig]Fixed
Details (4)
3.5.1-1+deb12u3· all · bookwormFixed · Fixed:
3.5.1-1+deb12u3usn · php-twig · debian · bookworm; usn · php-twig · debian · 12
3.5.1-1+deb12u3· all · bookwormFixed · Fixed:
3.5.1-1+deb12u3usn · php-twig · debian · bookworm; usn · php-twig · debian · 12
3.5.1-1+deb12u3· all · bookworm-securityFixed · Fixed:
3.5.1-1+deb12u3usn · php-twig · debian · bookworm; usn · php-twig · debian · 12
3.5.1-1+deb12u3· all · bookworm-securityFixed · Fixed:
3.5.1-1+deb12u3usn · php-twig · debian · bookworm; usn · php-twig · debian · 12
- [php-twig-cache-extra]Fixed
Source package: [php-twig]
Details (4)
3.5.1-1+deb12u3· all · bookwormFixed · Fixed:
3.5.1-1+deb12u3usn · php-twig · debian · bookworm; usn · php-twig · debian · 12
3.5.1-1+deb12u3· all · bookwormFixed · Fixed:
3.5.1-1+deb12u3usn · php-twig · debian · bookworm; usn · php-twig · debian · 12
3.5.1-1+deb12u3· all · bookworm-securityFixed · Fixed:
3.5.1-1+deb12u3usn · php-twig · debian · bookworm; usn · php-twig · debian · 12
3.5.1-1+deb12u3· all · bookworm-securityFixed · Fixed:
3.5.1-1+deb12u3usn · php-twig · debian · bookworm; usn · php-twig · debian · 12
- [php-twig-cssinliner-extra]Fixed
Source package: [php-twig]
Details (4)
3.5.1-1+deb12u3· all · bookwormFixed · Fixed:
3.5.1-1+deb12u3usn · php-twig · debian · bookworm; usn · php-twig · debian · 12
3.5.1-1+deb12u3· all · bookwormFixed · Fixed:
3.5.1-1+deb12u3usn · php-twig · debian · bookworm; usn · php-twig · debian · 12
3.5.1-1+deb12u3· all · bookworm-securityFixed · Fixed:
3.5.1-1+deb12u3usn · php-twig · debian · bookworm; usn · php-twig · debian · 12
3.5.1-1+deb12u3· all · bookworm-securityFixed · Fixed:
3.5.1-1+deb12u3usn · php-twig · debian · bookworm; usn · php-twig · debian · 12
- [php-twig-doc]Fixed
Source package: [php-twig]
Details (4)
3.5.1-1+deb12u3· all · bookwormFixed · Fixed:
3.5.1-1+deb12u3usn · php-twig · debian · bookworm; usn · php-twig · debian · 12
3.5.1-1+deb12u3· all · bookwormFixed · Fixed:
3.5.1-1+deb12u3usn · php-twig · debian · bookworm; usn · php-twig · debian · 12
3.5.1-1+deb12u3· all · bookworm-securityFixed · Fixed:
3.5.1-1+deb12u3usn · php-twig · debian · bookworm; usn · php-twig · debian · 12
3.5.1-1+deb12u3· all · bookworm-securityFixed · Fixed:
3.5.1-1+deb12u3usn · php-twig · debian · bookworm; usn · php-twig · debian · 12
- [php-twig-extra-bundle]Fixed
Source package: [php-twig]
Details (4)
3.5.1-1+deb12u3· all · bookwormFixed · Fixed:
3.5.1-1+deb12u3usn · php-twig · debian · bookworm; usn · php-twig · debian · 12
3.5.1-1+deb12u3· all · bookwormFixed · Fixed:
3.5.1-1+deb12u3usn · php-twig · debian · bookworm; usn · php-twig · debian · 12
3.5.1-1+deb12u3· all · bookworm-securityFixed · Fixed:
3.5.1-1+deb12u3usn · php-twig · debian · bookworm; usn · php-twig · debian · 12
3.5.1-1+deb12u3· all · bookworm-securityFixed · Fixed:
3.5.1-1+deb12u3usn · php-twig · debian · bookworm; usn · php-twig · debian · 12
- [php-twig-html-extra]Fixed
Source package: [php-twig]
Details (4)
3.5.1-1+deb12u3· all · bookwormFixed · Fixed:
3.5.1-1+deb12u3usn · php-twig · debian · bookworm; usn · php-twig · debian · 12
3.5.1-1+deb12u3· all · bookwormFixed · Fixed:
3.5.1-1+deb12u3usn · php-twig · debian · bookworm; usn · php-twig · debian · 12
3.5.1-1+deb12u3· all · bookworm-securityFixed · Fixed:
3.5.1-1+deb12u3usn · php-twig · debian · bookworm; usn · php-twig · debian · 12
3.5.1-1+deb12u3· all · bookworm-securityFixed · Fixed:
3.5.1-1+deb12u3usn · php-twig · debian · bookworm; usn · php-twig · debian · 12
- [php-twig-inky-extra]Fixed
Source package: [php-twig]
Details (4)
3.5.1-1+deb12u3· all · bookwormFixed · Fixed:
3.5.1-1+deb12u3usn · php-twig · debian · bookworm; usn · php-twig · debian · 12
3.5.1-1+deb12u3· all · bookwormFixed · Fixed:
3.5.1-1+deb12u3usn · php-twig · debian · bookworm; usn · php-twig · debian · 12
3.5.1-1+deb12u3· all · bookworm-securityFixed · Fixed:
3.5.1-1+deb12u3usn · php-twig · debian · bookworm; usn · php-twig · debian · 12
3.5.1-1+deb12u3· all · bookworm-securityFixed · Fixed:
3.5.1-1+deb12u3usn · php-twig · debian · bookworm; usn · php-twig · debian · 12
- [php-twig-intl-extra]Fixed
Source package: [php-twig]
Details (4)
3.5.1-1+deb12u3· all · bookwormFixed · Fixed:
3.5.1-1+deb12u3usn · php-twig · debian · bookworm; usn · php-twig · debian · 12
3.5.1-1+deb12u3· all · bookwormFixed · Fixed:
3.5.1-1+deb12u3usn · php-twig · debian · bookworm; usn · php-twig · debian · 12
3.5.1-1+deb12u3· all · bookworm-securityFixed · Fixed:
3.5.1-1+deb12u3usn · php-twig · debian · bookworm; usn · php-twig · debian · 12
3.5.1-1+deb12u3· all · bookworm-securityFixed · Fixed:
3.5.1-1+deb12u3usn · php-twig · debian · bookworm; usn · php-twig · debian · 12
- [php-twig-markdown-extra]Fixed
Source package: [php-twig]
Details (4)
3.5.1-1+deb12u3· all · bookwormFixed · Fixed:
3.5.1-1+deb12u3usn · php-twig · debian · bookworm; usn · php-twig · debian · 12
3.5.1-1+deb12u3· all · bookwormFixed · Fixed:
3.5.1-1+deb12u3usn · php-twig · debian · bookworm; usn · php-twig · debian · 12
3.5.1-1+deb12u3· all · bookworm-securityFixed · Fixed:
3.5.1-1+deb12u3usn · php-twig · debian · bookworm; usn · php-twig · debian · 12
3.5.1-1+deb12u3· all · bookworm-securityFixed · Fixed:
3.5.1-1+deb12u3usn · php-twig · debian · bookworm; usn · php-twig · debian · 12
- [php-twig-string-extra]Fixed
Source package: [php-twig]
Details (4)
3.5.1-1+deb12u3· all · bookwormFixed · Fixed:
3.5.1-1+deb12u3usn · php-twig · debian · bookworm; usn · php-twig · debian · 12
3.5.1-1+deb12u3· all · bookwormFixed · Fixed:
3.5.1-1+deb12u3usn · php-twig · debian · bookworm; usn · php-twig · debian · 12
3.5.1-1+deb12u3· all · bookworm-securityFixed · Fixed:
3.5.1-1+deb12u3usn · php-twig · debian · bookworm; usn · php-twig · debian · 12
3.5.1-1+deb12u3· all · bookworm-securityFixed · Fixed:
3.5.1-1+deb12u3usn · php-twig · debian · bookworm; usn · php-twig · debian · 12
[Debian 13 (Trixie)]
- [php-twig]Fixed
Details (4)
3.27.0-0+deb13u1· all · trixieFixed · Fixed:
3.14.2-1usn · php-twig · debian · 13
3.27.0-0+deb13u1· all · trixieFixed · Fixed:
3.14.2-1usn · php-twig · debian · 13
3.27.0-0+deb13u1· all · trixie-securityFixed · Fixed:
3.14.2-1usn · php-twig · debian · 13
3.27.0-0+deb13u1· all · trixie-securityFixed · Fixed:
3.14.2-1usn · php-twig · debian · 13
- [php-twig-cache-extra]Fixed
Source package: [php-twig]
Details (4)
3.27.0-0+deb13u1· all · trixieFixed · Fixed:
3.14.2-1usn · php-twig · debian · 13
3.27.0-0+deb13u1· all · trixieFixed · Fixed:
3.14.2-1usn · php-twig · debian · 13
3.27.0-0+deb13u1· all · trixie-securityFixed · Fixed:
3.14.2-1usn · php-twig · debian · 13
3.27.0-0+deb13u1· all · trixie-securityFixed · Fixed:
3.14.2-1usn · php-twig · debian · 13
- [php-twig-cssinliner-extra]Fixed
Source package: [php-twig]
Details (4)
3.27.0-0+deb13u1· all · trixieFixed · Fixed:
3.14.2-1usn · php-twig · debian · 13
3.27.0-0+deb13u1· all · trixieFixed · Fixed:
3.14.2-1usn · php-twig · debian · 13
3.27.0-0+deb13u1· all · trixie-securityFixed · Fixed:
3.14.2-1usn · php-twig · debian · 13
3.27.0-0+deb13u1· all · trixie-securityFixed · Fixed:
3.14.2-1usn · php-twig · debian · 13
- [php-twig-doc]Fixed
Source package: [php-twig]
Details (4)
3.27.0-0+deb13u1· all · trixieFixed · Fixed:
3.14.2-1usn · php-twig · debian · 13
3.27.0-0+deb13u1· all · trixieFixed · Fixed:
3.14.2-1usn · php-twig · debian · 13
3.27.0-0+deb13u1· all · trixie-securityFixed · Fixed:
3.14.2-1usn · php-twig · debian · 13
3.27.0-0+deb13u1· all · trixie-securityFixed · Fixed:
3.14.2-1usn · php-twig · debian · 13
- [php-twig-extra-bundle]Fixed
Source package: [php-twig]
Details (4)
3.27.0-0+deb13u1· all · trixieFixed · Fixed:
3.14.2-1usn · php-twig · debian · 13
3.27.0-0+deb13u1· all · trixieFixed · Fixed:
3.14.2-1usn · php-twig · debian · 13
3.27.0-0+deb13u1· all · trixie-securityFixed · Fixed:
3.14.2-1usn · php-twig · debian · 13
3.27.0-0+deb13u1· all · trixie-securityFixed · Fixed:
3.14.2-1usn · php-twig · debian · 13
- [php-twig-html-extra]Fixed
Source package: [php-twig]
Details (4)
3.27.0-0+deb13u1· all · trixieFixed · Fixed:
3.14.2-1usn · php-twig · debian · 13
3.27.0-0+deb13u1· all · trixieFixed · Fixed:
3.14.2-1usn · php-twig · debian · 13
3.27.0-0+deb13u1· all · trixie-securityFixed · Fixed:
3.14.2-1usn · php-twig · debian · 13
3.27.0-0+deb13u1· all · trixie-securityFixed · Fixed:
3.14.2-1usn · php-twig · debian · 13
- [php-twig-inky-extra]Fixed
Source package: [php-twig]
Details (4)
3.27.0-0+deb13u1· all · trixieFixed · Fixed:
3.14.2-1usn · php-twig · debian · 13
3.27.0-0+deb13u1· all · trixieFixed · Fixed:
3.14.2-1usn · php-twig · debian · 13
3.27.0-0+deb13u1· all · trixie-securityFixed · Fixed:
3.14.2-1usn · php-twig · debian · 13
3.27.0-0+deb13u1· all · trixie-securityFixed · Fixed:
3.14.2-1usn · php-twig · debian · 13
- [php-twig-intl-extra]Fixed
Source package: [php-twig]
Details (4)
3.27.0-0+deb13u1· all · trixieFixed · Fixed:
3.14.2-1usn · php-twig · debian · 13
3.27.0-0+deb13u1· all · trixieFixed · Fixed:
3.14.2-1usn · php-twig · debian · 13
3.27.0-0+deb13u1· all · trixie-securityFixed · Fixed:
3.14.2-1usn · php-twig · debian · 13
3.27.0-0+deb13u1· all · trixie-securityFixed · Fixed:
3.14.2-1usn · php-twig · debian · 13
- [php-twig-markdown-extra]Fixed
Source package: [php-twig]
Details (4)
3.27.0-0+deb13u1· all · trixieFixed · Fixed:
3.14.2-1usn · php-twig · debian · 13
3.27.0-0+deb13u1· all · trixieFixed · Fixed:
3.14.2-1usn · php-twig · debian · 13
3.27.0-0+deb13u1· all · trixie-securityFixed · Fixed:
3.14.2-1usn · php-twig · debian · 13
3.27.0-0+deb13u1· all · trixie-securityFixed · Fixed:
3.14.2-1usn · php-twig · debian · 13
- [php-twig-string-extra]Fixed
Source package: [php-twig]
Details (4)
3.27.0-0+deb13u1· all · trixieFixed · Fixed:
3.14.2-1usn · php-twig · debian · 13
3.27.0-0+deb13u1· all · trixieFixed · Fixed:
3.14.2-1usn · php-twig · debian · 13
3.27.0-0+deb13u1· all · trixie-securityFixed · Fixed:
3.14.2-1usn · php-twig · debian · 13
3.27.0-0+deb13u1· all · trixie-securityFixed · Fixed:
3.14.2-1usn · php-twig · debian · 13
Observed:
References
- [https://osv.dev/vulnerability/DEBIAN-CVE-2024-51754]
- [https://osv.dev/vulnerability/DLA-4186-1]
- [https://osv.dev/vulnerability/UBUNTU-CVE-2024-51754]
- [https://security-tracker.debian.org/tracker/CVE-2024-51754]
- [https://ubuntu.com/security/notices/USN-7456-1]
[Debian Security Tracker] · [FIRST EPSS] · [OSV Package Vulnerability Database] · [Ubuntu Security Notices (USN)]