2.2

CVE-2024-51754: twigphp twig Exposure of Resource to Wrong Sphere

CVSS: 2.2v3.1LowDeferred
AliasesUBUNTU-CVE-2024-51754DEBIAN-CVE-2024-51754DLA-4186-1
Published 06-11-2024Last modified 29-05-2025

Vulnerability summary

CVE-2024-51754 is a low (CVSS 2.2) Exposure of Resource to Wrong Sphere vulnerability in twigphp twig. EPSS estimates a 0.43% chance of exploitation in the next 30 days, higher than 36.4% of scored vulnerabilities.

Overall risk
9/100
0100
Minimal · default modelHow is this calculated?
CVSS score
2.2/10
010
Low · v3.1 (CVE.org)
EPSS score
0.43%
0%100%
Low · 0.00 pp in 30 days
KEVNot listedIn no KEV catalog
RansomwareNone recordedNo known use recorded
Public exploits0No public exploits recorded

Advisory lineage

Upstream 0 · Downstream 1 · Related 1

Timeline

  1. 06-11-2024
    PublishedVulnerability first disclosed.
  2. 29-05-2025
    Last modifiedVulnerability information updated.

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 metrics

4 scores · 4 sources · 1 version

EPSS trend

Probability

0.43%

Chance of exploitation in the next 30 days

Percentile

36%

Versus all other CVEs

30-day change

0.00 pp

From 0.43% on 20-09-2026

20-09-202620-10-2026
EPSS score
0.43%

Known exploited

Compare KEV catalogs

Not in any of the 3 tracked catalogs.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

Ubuntu2 products
  • php-twig< 2.12.5-1ubuntu0.1~esm2 | < 3.3.8-2ubuntu4+esm2 | < 3.8.0-2ubuntu0.1~esm1
  • twigAll versions (No fix recorded)
Debian1 product
  • php-twig< 3.5.1-1+deb12u3 | < 3.14.2-1 | < 2.14.3-1+deb11u4
Twigphp1 product
  • twig< 3.11.2 | ≥ 3.12.0, < 3.14.1

3 vendors · 4 products

References

7 links