{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2024-51754","id":"CVE-2024-51754","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 workarou","descriptionLong":"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.","published":"2024-11-06T19:28:17.553Z","updated":"2026-10-28T02:30:41.759063288Z","reserved":"2024-10-31T14:12:45.791Z","status":"Deferred","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":2.2,"vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:N/A:N","rating":"low","source":"GitHub_M"},"metrics":[{"version":"4.0","score":null,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","rating":"low","source":"GitHub"},{"version":"3.1","score":2.2,"vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:N/A:N","rating":"low","source":"GitHub_M"},{"version":"3.1","score":2.2,"vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:N/A:N","rating":"low","source":"github.com"},{"version":"3.1","score":2.2,"vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:N/A:N","rating":"low","source":"OSV"},{"version":"3.1","score":2.2,"vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:N/A:N","rating":"low","source":"GitHub"}],"rating":"low","products":["twigphp Twig"],"affectedProducts":[{"vendor":"twigphp","product":"Twig","defaultStatus":null,"versions":[{"version":"< 3.11.2","status":"affected"},{"version":">= 3.12.0, < 3.14.1","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"Packagist","name":"twig/twig","purl":"pkg:composer/twig/twig","ranges":["<3.11.2",">=3.12 <3.14.1"],"fixed":["3.11.2","3.14.1"],"advisory":"GHSA-6377-hfv9-hqf6"}],"cwes":["CWE-668"],"aliases":["GHSA-6377-hfv9-hqf6"],"references":[{"url":"https://github.com/twigphp/Twig/security/advisories/GHSA-6377-hfv9-hqf6","tags":["x_refsource_CONFIRM","advisory","web"]},{"url":"https://github.com/twigphp/Twig/commit/2bb8c2460a2c519c498df9b643d5277117155a73","tags":["x_refsource_MISC","fix","web"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/05/msg00039.html","tags":["web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/51xxx/CVE-2024-51754.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-51754","tags":["advisory"]},{"url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/twig/twig/CVE-2024-51754.yaml","tags":["web"]},{"url":"https://github.com/twigphp/Twig","tags":["package"]},{"url":"https://symfony.com/blog/unguarded-calls-to-__tostring-when-nesting-an-object-into-an-array","tags":["web"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial"},"epss":0.00431,"epssPercentile":0.38241,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2024-51754","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-51754","ok":true,"note":"Deferred"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2024-51754","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-6377-hfv9-hqf6","ok":true,"note":"GHSA-6377-hfv9-hqf6"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2024-51754","ok":true,"note":"scored 2026-11-20"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}