CVE Tools

CVE-2024-51754

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

Public exploit available. Not confirmed exploited in the wild yet. A vendor fix is available.

Published Updated Sources: CVE.org, NVD, GitHub

What to do

The vendor has published a fix. Version details are below where the sources state them.

What it is

From the CVE record

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.

In plain language

No plain-language summary for this CVE yet.

Exploitation

Where each signal puts this CVE on the scale from published to confirmed exploited.

EPSS35th
Public exploit
CISA KEV

Not in the catalog. CISA has not confirmed exploitation.

Public exploits

1 source with a proof of concept or module.

Exploit links, PoCs and Metasploit modules after sign-in
EPSS

0.4% chance of exploitation activity in the next 30 days, which ranks it in the 35th percentile of scored CVEs.

Exploit Prediction Scoring System, FIRST.org. A probability, not a confirmation.

Lifecycle

The patch came 282 days before any public exploit.

  1. OpenVAS check added
  2. Public exploit / PoCsource: github-poc
  3. Patch availablerecord updated
  4. Publishedweakness classified

Affected products

Technical detail

CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:N/A:N

Scored 2.2 by NVD.

How it is reached

  • Attack Vector NetworkExploitable remotely over the network without any special conditions
  • Attack Complexity HighRequires specific conditions like a race condition or non-default configuration
  • Privileges Required HighRequires admin or elevated privileges
  • User Interaction NoneNo user interaction needed — fully automated exploitation

Scope

  • Scope UnchangedImpact is limited to the vulnerable component itself

Impact if exploited

  • Confidentiality LowSome restricted information is disclosed, but limited in scope
  • Integrity NoneNo integrity impact
  • Availability NoneNo availability impact

Weaknesses

Sources

Watch the software you run.

My Stack ranks new CVEs for your products by real-world exploitation, so the next serious one reaches you without reading every advisory.

We'll flag the next CVE, public exploit or patch for Twig, not every advisory. This one: public exploit.

We use analytics cookies to see which pages and articles actually help people. Decline and none of them run — the site works the same. What we store