Information Exposure Affecting twig/twig package, versions >=1.0.0, <1.38.0 >=2.0.0, <2.7.0


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    EPSS
    0.16% (54th 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-173776
  • published 12 Mar 2019
  • disclosed 12 Mar 2019
  • credit Fabien Potencier

How to fix?

Upgrade twig/twig to version 1.38.0, 2.7.0 or higher.

Overview

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

Affected versions of this package are vulnerable to Information Exposure due to allowing the evaluation of non-trusted templates in a sandbox, where everything is forbidden if not explicitly allowed by a sandbox policy (tags, filters, functions, method calls, ...).

Note: If you are not using the sandbox, your code is not affected.

CVSS Scores

version 3.1
Expand this section

Snyk

Recommended
4.8 medium
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    High
  • Privileges Required (PR)
    Low
  • User Interaction (UI)
    Required
  • Scope (S)
    Unchanged
  • Confidentiality (C)
    High
  • Integrity (I)
    None
  • Availability (A)
    None
Expand this section

NVD

3.7 low