Protection Mechanism Failure Affecting twig/twig package, versions <3.11.2 >=3.12.0, <3.14.1


Severity

Recommended
0.0
low
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    EPSS
    0.04% (11th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-PHP-TWIGTWIG-8349790
  • published 7 Nov 2024
  • disclosed 6 Nov 2024
  • credit Jamie Schouten

How to fix?

Upgrade twig/twig to version 3.11.2, 3.14.1 or higher.

Overview

twig/twig is a flexible, fast, and secure template language for PHP.

Affected versions of this package are vulnerable to Protection Mechanism Failure in a sandbox due to improper object validation in the ensureToStringAllowed function. An attacker can invoke the __toString() method on an object even if the security policy disallows this method, when the object is included as part of an array or as an argument in a list (such as function arguments or filter conditions).

CVSS Scores

version 4.0
version 3.1
Expand this section

Snyk

Recommended
2.1 low
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    High
  • Attack Requirements (AT)
    Present
  • Privileges Required (PR)
    High
  • User Interaction (UI)
    None
  • Confidentiality (VC)
    Low
  • Integrity (VI)
    None
  • Availability (VA)
    None
  • Confidentiality (SC)
    None
  • Integrity (SI)
    None
  • Availability (SA)
    None