CVE & CISA-KEV Catalog

CVE-2024-51754

LOW
2.2
CVSS v3
NVD

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.

How to fix

Remediation Available
php-twigDebian
Fixed in:2.14.3-1+deb11u4CVE-2024-51754
Fixed in:3.5.1-1+deb12u3CVE-2024-51754
Fixed in:3.14.2-1CVE-2024-51754
Fixed in:3.14.2-1CVE-2024-51754
php-twigUbuntu
Fixed in:2.12.5-1ubuntu0.1~esm2USN-7456-1
Fixed in:3.3.8-2ubuntu4+esm2USN-7456-1
Fixed in:3.8.0-2ubuntu0.1~esm1USN-7456-1

Remediation is compiled from vendor and distribution security advisories. Always confirm against the linked source for your exact version and platform.

CVSS v3 Vector

Exploitability

Attack VectorNetwork
Attack ComplexityHigh
Privileges RequiredHigh
User InteractionNone
ScopeUnchanged

Impact

ConfidentialityLow
IntegrityNone
AvailabilityNone

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

Exploit Intelligence

0.44%probability of exploitation in 30 days
35thpercentile

Low risk: more likely to be exploited than 35% of all known CVEs.

References

Related Vulnerabilities

Other CWE-668 vulnerabilities, ordered by exploit likelihood. View all

CVESeverityCVSSEPSSExploitedFix
CVE-2022-39952Critical9.8100%-Fix
CVE-2017-16597Critical9.857%--
CVE-2017-16603High8.854%--
CVE-2024-25153Critical9.842%-Fix
CVE-2017-0215Medium5.336%--
CVE-2022-25236Critical9.834%-Fix
Embed a live status badge for CVE-2024-51754
CVE-2024-51754 severity badge

Markdown

[![CVE-2024-51754](https://tridentstack.com/cve/badge/CVE-2024-51754.svg)](https://tridentstack.com/cve/CVE-2024-51754)

HTML

<a href="https://tridentstack.com/cve/CVE-2024-51754"><img src="https://tridentstack.com/cve/badge/CVE-2024-51754.svg" alt="CVE-2024-51754"></a>

Find and fix vulnerabilities across your fleet

TridentStack Control continuously scans your Windows, macOS, and Linux fleet for known vulnerabilities, prioritizes them by severity and active exploitation, and patches them automatically.

Start free

This product uses NVD data but is not endorsed or certified by the NVD. EPSS scores courtesy of FIRST.org (https://www.first.org/epss). Source: CISA KEV Catalog. Data as of 2025-05-29.