GHSA-6377-hfv9-hqf6
Vulnerability from github
Published
2024-11-06 19:52
Modified
2024-11-12 19:42
Severity ?
Summary
Twig has unguarded calls to `__toString()` when nesting an object into an array
Details
Description
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).
Resolution
The sandbox mode now checks the __toString()
method call on all objects.
The patch for this issue is available here for the 3.11.x branch, and here for the 3.x branch.
Credits
We would like to thank Jamie Schouten for reporting the issue and Fabien Potencier for providing the fix.
{ "affected": [ { "package": { "ecosystem": "Packagist", "name": "twig/twig" }, "ranges": [ { "events": [ { "introduced": "0" }, { "fixed": "3.11.2" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "Packagist", "name": "twig/twig" }, "ranges": [ { "events": [ { "introduced": "3.12" }, { "fixed": "3.14.1" } ], "type": "ECOSYSTEM" } ] } ], "aliases": [ "CVE-2024-51754" ], "database_specific": { "cwe_ids": [ "CWE-668" ], "github_reviewed": true, "github_reviewed_at": "2024-11-06T19:52:31Z", "nvd_published_at": "2024-11-06T20:15:05Z", "severity": "LOW" }, "details": "### Description\n\nIn 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).\n\n### Resolution\n\nThe sandbox mode now checks the `__toString()` method call on all objects.\n\nThe patch for this issue is available [here](https://github.com/twigphp/Twig/commit/cafc608ece310e62a35a76f17e25c04ab9ed05cc) for the 3.11.x branch, and [here](https://github.com/twigphp/Twig/commit/d4a302681bca9f7c6ce2835470d53609cdf3e23e) for the 3.x branch.\n\n### Credits\n\nWe would like to thank Jamie Schouten for reporting the issue and Fabien Potencier for providing the fix.\n", "id": "GHSA-6377-hfv9-hqf6", "modified": "2024-11-12T19:42:25Z", "published": "2024-11-06T19:52:31Z", "references": [ { "type": "WEB", "url": "https://github.com/twigphp/Twig/security/advisories/GHSA-6377-hfv9-hqf6" }, { "type": "ADVISORY", "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-51754" }, { "type": "WEB", "url": "https://github.com/twigphp/Twig/commit/2bb8c2460a2c519c498df9b643d5277117155a73" }, { "type": "WEB", "url": "https://github.com/FriendsOfPHP/security-advisories/blob/master/twig/twig/CVE-2024-51754.yaml" }, { "type": "PACKAGE", "url": "https://github.com/twigphp/Twig" }, { "type": "WEB", "url": "https://symfony.com/blog/unguarded-calls-to-__tostring-when-nesting-an-object-into-an-array" } ], "schema_version": "1.4.0", "severity": [ { "score": "CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:N/A:N", "type": "CVSS_V3" }, { "score": "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", "type": "CVSS_V4" } ], "summary": "Twig has unguarded calls to `__toString()` when nesting an object into an array" }
Loading...
Loading...
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.