Drupal uses the Twig third-party library for content templating and sanitization.
Impact
Drupal uses the Twig third-party library for content templating and sanitization. Twig has released a security update that affects Drupal. Twig has rated the vulnerability as high severity.
Source excerpt · OSVThe vulnerability is mitigated by the fact that an exploit is only possible in Drupal core with a restricted access administrative permission.
Affected packages
Start with the recorded fix for your release branch. Check your installed version and test compatibility before upgrading. Fixing this advisory does not rule out other vulnerabilities in the release.
| Affected range | Recorded fix |
|---|---|
| From 8.0.0 before 9.3.22Ecosystem versions | 9.3.22 |
| From 9.4.0 before 9.4.7Ecosystem versions | 9.4.7 |
Version evidence: OSV · DRUPAL-CORE-2022-016
View original version evidence (268 explicit versions)
| Affected range | Recorded fix |
|---|---|
| From 1.0.0 before 1.44.7Ecosystem versions | 1.44.7 |
| From 2.0.0 before 2.15.3Ecosystem versions | 2.15.3 |
| From 3.0.0 before 3.4.3Ecosystem versions | 3.4.3 |
Version evidence: OSV · GHSA-52m2-vc4m-jj33
View original version evidence (193 explicit versions)
Original source description
Drupal uses the Twig third-party library for content templating and sanitization. Twig has released a security update that affects Drupal. Twig has rated the vulnerability as high severity.
Drupal core's code extending Twig has also been updated to mitigate a related vulnerability.
Multiple vulnerabilities are possible if an untrusted user has access to write Twig code, including potential unauthorized read access to private files, the contents of other files on the server, or database credentials.
The vulnerability is mitigated by the fact that an exploit is only possible in Drupal core with a restricted access administrative permission. Additional exploit paths for the same vulnerability may exist with contributed or custom code that allows users to write Twig templates.
References
- Security advisory www.drupal.org/sa-core-2022-016
- Security advisory github.com/twigphp/Twig/security/advisories/GHSA-52m2-vc4m-jj33
- Security advisory nvd.nist.gov/vuln/detail/CVE-2022-39261
- Patch github.com/twigphp/Twig/commit/35f3035c5deb0041da7b84daf02dea074ddc7a0b
- Security advisory github.com/FriendsOfPHP/security-advisories/blob/master/twig/twig/CVE-2022-39261.yaml
- Source reference github.com/twigphp/Twig
- Source reference lists.debian.org/debian-lts-announce/2022/10/msg00016.html
- Source reference lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/2OKRUHPVLIQVFPPJ2UWC3WV3WQO763NR
- Source reference lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/AUVTXMNPSZAHS3DWZEM56V5W4NPVR6L7
- Source reference lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/NWRFPZSR74SYVJKBTKTMYUK36IJ3SQJP
- Source reference lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/TW53TFJ6WWNXMUHOFACKATJTS7NIHVQE
- Source reference lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/WV5TNNJLGG536TJH6DLCIAAZZIPV2GUD
- Source reference lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/YU4ZYX62H2NUAKKGUES4RZIM4KMTKZ7F
- Security advisory symfony.com/blog/twig-security-release-possibility-to-load-a-template-outside-a-configured-directory-when-using-the-filesystem-loader
- Security advisory www.debian.org/security/2022/dsa-5248