CVE-2024-51754: Twig has unguarded calls to `__toString()` when nesting an object into an array

CVE-2024-51754 · Severity: low · CVSS 3.1 · Published 2024-11-06

Twig has unguarded calls to `__toString()` when nesting an object into an array

Technologies: twig/twig (Packagist). Vendors: Packagist.

Quick answers

Is CVE-2024-51754 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2024-51754 being exploited in the wild.
How severe is CVE-2024-51754?
Low severity, with a CVSS score of 3.1, published 6 November 2024.
Which products and versions are affected?
twig/twig (Packagist) ECOSYSTEM:introduced=0,fixed=3.11.2.
Is there a fix for CVE-2024-51754?
Yes. twig/twig (Packagist): upgrade to 3.11.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
Am I affected by CVE-2024-51754?
Check whether you run twig/twig (Packagist) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • twig/twig (Packagist): upgrade to 3.11.2 or later
    composer require twig/twig:^3.11.2

Affected products

  • twig/twig (Packagist) ECOSYSTEM:introduced=0,fixed=3.11.2

Identifiers

  • CVE-2024-51754
  • GHSA-6377-hfv9-hqf6

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.