QID 154123

Date Published: 2022-10-06

QID 154123: Drupal Core: Twig Template Path Traversal Vulnerability (CVE-2022-39261)

Drupal is a free and open source content management framework written in PHP and distributed under the GNU General Public License.

Drupal uses the Twig third-party library for content templating and sanitization. Twig is vulnerable to path traversal. When using the filesystem loader to load templates for which the name is a user input, it is possible to use the source or include statement to read arbitrary files from outside the templates directory when using a namespace like @somewhere/../some.file (in such a case, validation is bypassed).

Affected Versions:
Drupal 8.0.0 to 9.3.22
Drupal 9.4.0 to 9.4.7

QID Detection Logic:(Unauthenticated)
This QID checks for vulnerable version of Drupal installed on the target.

Successful exploitation of the vulnerability may allow remote attackers to read sensitive files on the target server.

  • CVSS V3 rated as High - 7.5 severity.
  • CVSS V2 rated as High - 7.8 severity.
  • Solution
    Customers are advised to install latest Drupal version.
    For more information visit Drupal security advisory SA-CORE-2022-016.
    Vendor References

    CVEs related to QID 154123

    Software Advisories
    Advisory ID Software Component Link
    SA-CORE-2022-016 URL Logo www.drupal.org/sa-core-2022-016
    © CVE.report 2026 |

    Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

    CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

    Free CVE JSON API cve.report/api

    CVE.report and Source URL Uptime Status status.cve.report