Improper access control in Twig - CVE-2024-51754

 

Improper access control in Twig - CVE-2024-51754

Published: November 6, 2024 / Updated: May 20, 2026


Vulnerability identifier: #VU131987
CSH Severity: Low
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:U/U:Clear
CVE-ID: CVE-2024-51754
CWE-ID: CWE-284
Exploitation vector: Remote access
Exploit availability: No public exploit available
Vendor: Symfony
Affected software:
Twig

Detailed vulnerability description

The vulnerability allows a remote user to disclose sensitive information.

The vulnerability exists due to improper access control in the sandbox when processing objects in an array or an argument list. A remote privileged user can place an object in an array or argument list to disclose sensitive information.

The issue occurs when __toString() is invoked even though that method is not allowed by the security policy.


How to mitigate CVE-2024-51754

Install security update from vendor's website.

Sources