CVE-2024-51754

LOW
Published Nov 6, 2024 Modified Apr 15, 2026 CWE-668

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.

CVSS v3.1 Score

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

Weakness Type (CWE)

CWE-668 CWE-668

References

Frequently Asked Questions

What is CVE-2024-51754? +
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. It has a CVSS v3.1 base score of 2.2 (LOW).
How severe is CVE-2024-51754? +
CVE-2024-51754 has a CVSS v3.1 score of 2.2 out of 10, rated LOW. This is a low-severity vulnerability with limited impact.
How do I check if I'm vulnerable to CVE-2024-51754? +
You can use Secably's free Website Scanner to check your website for known vulnerabilities. For infrastructure scanning, use the Port Scanner to identify exposed services that may be affected. Check the vendor advisories linked above for specific patch and version information.

Related Vulnerabilities

Don't wait for an exploit

Scan your website for vulnerabilities like CVE-2024-51754 — free, no signup required.

Start Free Scan