CVE-2024-51754Unguarded calls to __toString() when nesting an object into an array in Twig
- 2.2LowCVSS base score
- 0.43%Exploitation in 30 daysEPSS · top 62% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
Description
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.
Timeline
ID reserved
By GitHub_M
- 6 days later
· 6 days later
Published
- 7 months later
· 7 months later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | Low2.2 | CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:N/A:N |
| NVDNVD · Deferred | 3.1 | Low2.2 | CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:N/A:N |
- EPSS (exploitation in 30 days)
- 0.43% · top 62% of all CVEs (19 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: no · Technical impact: partial
The list uses the assigner's score when there is one, then CISA's, then NVD's: Low 2.2.
Affected products
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- Packagisttwig/twigGHSA-6377-hfv9-hqf6 (opens in a new tab)
References
References3
- https://github.com/twigphp/Twig/security/advisories/GHSA-6377-hfv9-hqf6 (opens in a new tab)x_refsource_CONFIRM
- https://github.com/twigphp/Twig/commit/2bb8c2460a2c519c498df9b643d5277117155a73 (opens in a new tab)x_refsource_MISC
- https://lists.debian.org/debian-lts-announce/2025/05/msg00039.html (opens in a new tab)
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2024-3201 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-6377-hfv9-hqf6 (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2024-51754)Record last updated .