{"id":"CVE-2024-51754","state":"PUBLISHED","title":"Unguarded calls to __toString() when nesting an object into an array in Twig","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.","publishedAt":"2024-11-06T19:28:17.553Z","updatedAt":"2025-05-29T09:03:17.579Z","severity":{"score":2.2,"label":"Low","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:N/A:N","source":"GitHub_M"},"assigner":"GitHub_M","products":["twigphp Twig"],"affected":[{"vendor":"twigphp","product":"Twig","versions":[{"version":"< 3.11.2","status":"affected"},{"version":">= 3.12.0, < 3.14.1","status":"affected"}]}],"references":["https://github.com/twigphp/Twig/security/advisories/GHSA-6377-hfv9-hqf6","https://github.com/twigphp/Twig/commit/2bb8c2460a2c519c498df9b643d5277117155a73","https://lists.debian.org/debian-lts-announce/2025/05/msg00039.html"],"weaknesses":["CWE-668"],"ingestedAt":"2026-10-29T20:08:04.920Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/51xxx/CVE-2024-51754.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-2024-51754","state":"PUBLISHED","datePublished":"2024-11-06T19:28:17.553Z","dateUpdated":"2025-05-29T09:03:17.579Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2024-10-31T14:12:45.791Z"},"containers":{"cna":{"title":"Unguarded calls to __toString() when nesting an object into an array in Twig","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"twigphp","product":"Twig","versions":[{"version":"< 3.11.2","status":"affected"},{"version":">= 3.12.0, < 3.14.1","status":"affected"}]}],"references":[{"url":"https://github.com/twigphp/Twig/security/advisories/GHSA-6377-hfv9-hqf6","name":"https://github.com/twigphp/Twig/security/advisories/GHSA-6377-hfv9-hqf6","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/twigphp/Twig/commit/2bb8c2460a2c519c498df9b643d5277117155a73","name":"https://github.com/twigphp/Twig/commit/2bb8c2460a2c519c498df9b643d5277117155a73","tags":["x_refsource_MISC"]}],"metrics":[{"cvssV3_1":{"attackComplexity":"HIGH","attackVector":"NETWORK","availabilityImpact":"NONE","baseScore":2.2,"baseSeverity":"LOW","confidentialityImpact":"LOW","integrityImpact":"NONE","privilegesRequired":"HIGH","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:N/A:N","version":"3.1"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-668","lang":"en","description":"CWE-668: Exposure of Resource to Wrong Sphere","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2024-11-06T19:28:17.553Z"},"source":{"advisory":"GHSA-6377-hfv9-hqf6","discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2024-11-06T19:40:22.129936Z","id":"CVE-2024-51754","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-11-06T19:44:28.082Z"}},{"title":"CVE Program Container","references":[{"url":"https://lists.debian.org/debian-lts-announce/2025/05/msg00039.html"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2025-05-29T09:03:17.579Z"}}]}}}