Read the docs
TI-2024-34659 Aliases CVE-2024-51754GHSA-6377-hfv9-hqf6

Unguarded calls to __toString() when nesting an object into an array in Twig

Priority LOW 12CWE-668Published · Updated

Key facts

Attack vector
Network
Privileges required
High
User interaction
None
Attack complexity
High
Impact type
Information disclosure
Confidentiality · integrity · availability
Low · None · None
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-668 and the CVSS impact.

Summary

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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00431 37th percentileScored 2026-11-07
Fix Fixed Twig (twigphp): 3.11.2, 3.14.1twig/twig (Packagist): 3.11.2, 3.14.1

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
symfonyTwigbefore 3.11.2; 3.12.0 to before 3.14.13.11.2, 3.14.1Patch availableCNA
—twig/twig (Packagist)before 3.11.23.11.2Patch availableGHSA-6377-hfv9-hqf6
—twig/twig (Packagist)3.12 to before 3.14.13.14.1Patch availableGHSA-6377-hfv9-hqf6
  • Twig Vendorsymfony Affected before 3.11.2; 3.12.0 to before 3.14.1 Fixed in 3.11.2, 3.14.1 Patch available CNA
  • twig/twig (Packagist) Vendor— Affected before 3.11.2 Fixed in 3.11.2 Patch available GHSA-6377-hfv9-hqf6
  • twig/twig (Packagist) Vendor— Affected 3.12 to before 3.14.1 Fixed in 3.14.1 Patch available GHSA-6377-hfv9-hqf6

CPE names Threatist (inferred) · 1

Inferred from how NVD named this product before; not given by a source.

CPEVersionsRoleVendor
cpe:2.3:a:symfony:twig:*:*:*:*:*:*:*:*——symfony
  • cpe:2.3:a:symfony:twig:*:*:*:*:*:*:*:* Versions — — ·symfony

Remediation

  • Fix · CNA Twig (twigphp) Fixed in 3.11.2, 3.14.1
  • Fix · GHSA-6377-hfv9-hqf6 twig/twig (Packagist) Fixed in 3.11.2 Advisory →
  • Fix · GHSA-6377-hfv9-hqf6 twig/twig (Packagist) Fixed in 3.14.1 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2024-51754
  2. 2026-10-03 Alias added: GHSA-6377-hfv9-hqf6

References

  • TI-2024-33775 Ability to change environment from query in symfony/runtime CVSS 3.1HIGH 7.3
  • TI-2026-34283 Twig: The `spaceless` filter implicitly marks its output as safe CVSS 4.0MEDIUM 5.1
  • TI-2022-07667 Code injection in Twig CVSS 3.1CRITICAL 9.8
  • TI-2018-10028 Twig before 2.4.4 allows Server-Side Template Injection (SSTI) via the search search_key… CVSS 3.0CRITICAL 9.8
  • TI-2026-35851 Incorrect authorization in symfony CVSS 4.0HIGH 8.7
  • TI-2026-35264 Improper input validation in symfony CVSS 4.0HIGH 8.3
See all 94 →

Sources