Vulnerabilities

CVE-2024-51754

Low 2.2 CVSS 3.1

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 workarounds for this issue.

Description as published by the source, in English.

Key facts

Published
2024-11-06
Last modified
2026-06-17
Assigned by
security-advisories@github.com
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:N/A:N
Scored by
security-advisories@github.com
Probability of exploitation
0.4 % higher than 37 % of all known vulnerabilities
EPSS, next 30 days, model v2026.06.15
Fix available
Not registered in the sources

Affected products

Vendor Product Versions Status
twig twig (Packagist) < 3.11.2 Affected
twig twig (Packagist) ≥ 3.12, < 3.14.1 Affected

Weakness type

References

Does this affect you?

A vulnerability matters only if you run the product, in an affected version, somewhere an attacker can reach.

Check your asset list Browse all vulnerabilities